Drupal 5 Series Guide

Installing, configuring, maintaining and using Drupal series 5 and Drupal modules on Debian GNU/Linux.

1.0 Drupal

Choose Drupal version

As of March 2008 we're choosing version 5.7.


Installation At The Command-line

Installation documentation is in drupal.org/INSTALL.txt and drupal.org/INSTALL.mysql.txt but it's a bit generic.

# cd /srv

# wget http://ftp.drupal.org/files/projects/drupal-5.7.tar.gz

# tar -xzf drupal-5.7.tar.gz

# mv drupal-5.7 drupal

# ln -s /srv/drupal /var/www/drupal

(TODO: set /srv/drupal so that everything saved below it is www-data.www-data?)

Apache by default runs as the user www-data.
If youre installing this on a personal workstation and want to be able to easily have the web server serve up pages from your home directories that you're working on, there will be permissions issues so you can change the user Apache runs as to your own username.
If this is a dedicated web server, set permissions to all files to be used by the web server to www-data.www-data:
# chown www-data.www-data /srv/drupal -R

Keep track of the database connection settings:
database name: <your Drupal database name>
username: <your Drupal database user name>
password: <your Drupal database user password>

Create the database:
# mysql -p
mysql> create database <your Drupal database name>;
ON <your Drupal database name>.*
TO '<your Drupal database user name>'@'localhost' IDENTIFIED BY '<your Drupal database user password>';

Run the installation at http://<server>/drupal/ and enter the database connection settings (these are saved in ./sites/default/settings.php)

Keep track of the Drupal administration account you create:
username: <your Drupal administrator account, for example admin>
email address:

Create directory for files such as custom logos, user avatars and other media associated with your new site:
# mkdir /srv/drupal/files
# chown www-data.www-data /srv/drupal/files

TODO: "CRON TASKS - Many Drupal modules (such as the search functionality) have periodic tasks that must be triggered by a cron job. To activate these tasks, call the cron page by visiting http://www.example.com/cron.php -- this will pass control to the modules and the modules will decide if and what they must do.
Most systems support the crontab utility for scheduling tasks like this. The following example crontab line will activate the cron tasks automatically on the hour:
0 * * * * wget -O - -q -t 1 http://www.example.com/cron.php"

From CiviCRM documentation:
# mkdir /srv/drupal/temp
# chown www-data.www-data /srv/drupal/temp

Installing Modules

# mkdir /srv/drupal/sites/all/modules
# mkdir /srv/drupal/sites/all/themes
# chown www-data.www-data /srv/drupal/sites/all/modules
# chown www-data.www-data /srv/drupal/sites/all/themes
Copy module to or download into /srv/drupal/sites/all/modules/
# tar -xzf <module>.tgz
# chown www-data.www-data /srv/drupal/sites/all/modules/<module> -R

Further Reading


How to properly 'clear' the accesslog, cache, and watchdog tables in my database?

2.0 CiviCRM Module

Web site: civicrm.org

Version we're currently using: 2.0 series (2.0.1 at present)

Follow the installation instructions at wiki.civicrm.org/confluence/display/CRMDOC/Install+2.0+for+Drupal.

Create database and set permissions:
# mysql -p
mysql> create database civicrm;
mysql> GRANT all ON civicrm.* TO 'civicrm'@'localhost' IDENTIFIED BY '<your CiviCRM database user password>';

(TODO: what priviliges in particular does it actually require?)

Requirements → PHP Configuration → Memory allocated (PHP config option 'memory_limit') - "CiviCRM needs a minimum of 32M allocated to PHP, but recommends 64M. You only have 16M allocated". Set 'memory_limit' to 64M rather than 16M in /etc/php5/apache2/php.ini then restart Apache with /etc/init.d/apache2 restart

# mkdir /srv/drupal/sites/all/modules/civicrm/uploads
# chown www-data.www-data /srv/drupal/sites/all/modules/civicrm/uploads

Note: If you have issues you can remove civicrm.settings.php then re-run the installer.

Getting Help With CiviCRM

drupal.demo.civicrm.org (login as demo / demo)