Restricted/admin/drupal

From AnnodexFoundation

Jump to: navigation, search

Contents

Installing Drupal for www.annodex.net

Installing Drupal

  • install apache2, mysql-server, php (>=5.0 if you want to run annodex drupal extension), php-mysql, php-cgi, libapache2-mod-php
  • Set extension_dir in /etc/php5/apache2/php.ini to /usr/lib/php5/20051025/ and activate extension=mysql.so
  • Activate apache2 mod_rewrite in /etc/apache2/mods-enabled/
  • Go to http://www.drupal.org/ and download the latest drupal package (don't get it from debian - it's ususally too old; anything from drupal 4.6 will use php5)
  • Unpack it into /var/www/xxx (don't forget the .htaccess file) and follow the INSTALL.txt file and the INSTALL.mysql.txt file; the most important steps are:
* create drupal database "mysqladmin -u root -p create drupal"
* set database access rights "mysql -u root -p" and at prompt enter "GRANT ALL PRIVILEGES ON drupal.* TO nobody@localhost IDENTIFIED BY 'password';" and "FLUSH PRIVILEGES;" and "quit"
* load required tables into drupal database: "mysql -u nobody -p drupal < database/database.mysql"
  • edit sites/default/settings.php and set $db_url = 'mysql://nobody:password@localhost/drupal'; and fix $base_url
  • mkdir files; chmod 777 files; for upload directory
  • point browser to drupal site, create first user account and you should be up and running
  • to install a theme, create a new directory under themes/
  • administrate setup administrator->settings
  • set up a crontab for calling cron.php regularly to get search and other things working (see http://drupal.org/cron and install lynx)

More stuff for www.annodex.net

  • use drupal version 4.7 or higher in order to use the phptemplate way of doing themes (and to have php5 support)
  • install the anx_php theme into themes/anx_php and activate it through the administer space; configure it to display the site slogan
  • install taxonomy_menu modules http://drupal.org/project/taxonomy_menu (make sure to get the right version for your drupal version) by copying the taxonomy_menu.module file into the modules directory; it is required to make the top menus work
  • install filemanager module http://drupal.org/project/filemanager/ ; you will need to add tables to the drupal database by calling "mysql -u nobody -p drupal < filemanager.mysql", then copy the filemanager.module into the modules directory; filemanager is required for acidfree
  • install nice_menus module http://drupal.org/node/43047 by copying the complete nice_menus directory into the modules directory and configuring it as stated in the README.txt file; you will only need one nice_menu in blocks. nice_menus is required to achieve the drop-down menu at the top of the page.
  • mkdir private; chmod 777 private; required by filemanager
  • manage modules: go to administer -> modules; enable "filemanager", "frontpage", "path", "profile", "search", "sitemap", "statistics", "taxonomy_menu" modules;
  • the frontpage module needs further administration (see documentation from Andrea - use the frontpage.txt content inside the anx_php directory)
  • the filemanager module needs to be set up under administrator->settings->filemanager before installing acidfree


Installing Annodex drupal module anode

  • install Acidfree (see http://drupal.org/project/acidfree); you will need to have the filemanager module installed (and a patch as at March 2006 - check the acidfree install instructions); you install acidfree by coping the directory into the modules directory
  • create the table for storing clip information: "mysql -u root -p drupal < anode.mysql".
  • copy class_annodex.inc and output_annodex.php into the /modules/acidfree/ directory.

Creating a Backup

  • call "mysqldump -p -u nobody --all-databases > backup.msql" to take a dump of all the databases in mysql
  • copy the complete drupal directoy to get all adaptations; some of it is just the drupal code, but there is content in subdirectories and there is the custom theme in theme/anx_php, and there is the adapted "sites/default/settings.php", so you might as well copy it all (e.g. tar czvf backup.tar.gz /var/www/www.annodex.net)

Fixing a broken table

  • the drupal tables are found in /var/lib/mysql/drupal/ (su root to get there)
  • the repair command is e.g. "myisamck -r sessions.MYI"


Upgrading Drupal

  • read UPDATE.txt in the drupal directory
  • take a backup
  • install version of drupal over old one
  • (import db dump if necessary: mysql -u root -p < dumpfile.msql)
  • make sure "sites/default/settings.php", the "files" subdirectory, and any custom themes still exist in the new installation
  • for www.annodex.net, also make sure the following directories still exist: themes/anx_php, software, private
  • for www.annodex.net, you may possibly also need to upgrade the modules (see the ones that were custom installed above)


More info on the www.annodex.net server

  • man2html is used for display of manpages from inside some of the drupal content; this is particularly the case for the commandline tools and therefore the server that drupal runs on will also need an installation of these tools
Personal tools