Project

General

Profile

Drupal5 Installation on Debian Etch

Drupal is currently not included within the stable release of Debian Etch. Thus, we have to install it from the original [Drupal site

Drupal depends on PHP5 and a database engine as MySQL. So, we have to prepare our system configuration installing the relating Debian packages and downloading the current version of Drupal:

# apt-get install mysql-server
# apt-get install php5 php5-mysql
# wget http://ftp.drupal.org/files/projects/drupal-5.2.tar.gz

Configuring MySQL

In order to get working with Drupal, we need to add at least on user (root) acting as database administrator in MySQL and then create an empty database for our Drupal installation and grant the database administrator access rights to the Drupal database.

# mysqladmin -u root password 'secret'
# mysqladmin -u root -p create drupal5
# mysql -u root -p
GRANT ALL PRIVILEGES ON drupal.* TO root;

The answer should be

'Query OK, 0 rows affected'.

Now, activate the database and leave the MySQL console

flush privileges;
exit

If you like to introduce an specific Drupal database administrator, you may add another user to MySQL and granting the privileges to him, e.g.

# mysql -u root -p
GRANT ALL PRIVILEGES ON drupal.* TO drupal@localhost IDENTIFIED by 'secret';

This Wiki provides further information on MySQL and MySQL Debian Etch installation.

Configuring PHP5

The default Debian Etch installation of PHP5 ist not threadsafe. This prevents the usage of most performant apache2-mpm-worker package.

There is an how-to available, that this could be achieved using mod_fcgid (Debian package libapache2-mod-fcgid).

But it appears, that there is some configuration effort needed to use this apache module.

Currently, this issue is work in progress...

Configuring Drupal5

After having configured the database, you can install Drupal by extracting the current version into the publication path of your webserver (/var/www) and restart the web server

# tar xvfz drupal-5.2.tar.gz -C /var/www/
# /etc/init.d/apache2 restart

During the initial Drupal configuration, Drupal's configuration file /var/www/drupal-5.2/sites/default/settings.php must be writeable at least for the user www-data (account of the apache web server). The simplest way to do this:

# chmod 666  /var/www/drupal-5.2/sites/default/settings.php

Next, direct your browser to the URL of your webserver's Drupal installation path (e.g. http://localhost/drupal-5.2/ and fill in the presented form with

  • the name (or URL to) your Drupal database (e.g. drupal5)

  • the user id and the password of the MySQL database administrator for drupal (e.g. root)

Then, the database should be populated by the installation script automatically. Finally, you should create a new Drupal user (e.g. root) and assign him administrative access rights for Drupal. (Button Create New Account)

Don't forget to reset access rights of the Drupal configuration file:

# chmod 640 /var/www/drupal-5.2/sites/default/settings.php

Note:

If you get error messages figuring out, that there are some access right violations, then rename the .htaccess file within you Drupal installation.

# mv /var/www/drupal-5.2/.htaccess /var/www/drupal-5.2/.htaccess.orig

If it works now, then, some properties may be defined in your default apache configuration (e.g. /etc/apache2/conf.d) that are redefined in the _.htaccess file. Take a look in the apache error log file for further hints (/var/log/apache2/error.log).

Add picture from clipboard (Maximum size: 40 MB)