Restricted/admin/drupal
From AnnodexFoundation
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 a root password for mysql root: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html (e.g. in ~root/.my.cnf)
- 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 sitemap module http://drupal.org/project/sitemap/ - (use http://www.lullabot.com/formupdater to update it if necessary); this also requires installation of graphviz (the google gsitemap module would be a nice extension for the future to get better coverage of google searches)
- install front_page module http://drupal.org/project/front/ by copying frontpage.module into the modules directory; check out http://drupal.org/node/23224 to use php stuff with the front_page module; front_page is needed for anx_php's home page
- 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
- install acidfree module http://drupal.org/project/acidfree/ (see next section if you want it to run annodex) (no need to install the filemanager patch, since it has been applied already see http://drupal.org/cvs?file=/modules/acidfree/filemanager-private.patch)
Installing Annodex drupal module anode
- install phpannodex (see http://svn.annodex.net/)
- 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
- when a "table was marked as crashed and should be repaired", use the myisamchk command (http://dev.mysql.com/doc/refman/5.0/en/table-maintenance.html) to fix it
- 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
