Installing Drupal 5
January 30, 2007 by Fernando Duran
Installation instructions at: http://drupal.org/node/260
Here are some extra tips and gotchas.
1) Check versions of php and mysql, you need php 4.x and mysql 4.1 or 5.0
# php -v
# mysql --version
2) Create database and user / password
You can use phpmyadmin, the mysql module in webmin or the mysql client from the command prompt.
3) Get Drupal and extract it (latest versions in: http://drupal.org/project/Drupal+project ):
# cd /tmp
# wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-5.1.tar.gz
# tar xzvf drupal-5.1.tar.gz
3) move the Drupal directory
# cd your_public_html_directory
# mv /tmp/drupal-5.1/* .
# mv /tmp/drupal-5.1/.htaccess .
At this point you should see with your browser the Drupal installation page at your site's url.
4) Get the three database pieces of information (database name, username and password) into the settings.php file
edit the $db_url line in ./sites/default/settings.php with the values for the database user, password and database name created earlier:
$db_url = 'mysql://db_user:password@localhost/db_name';
or easier without editing: just change the permissions for the settings.php file so the installer can set these values:
#chmod 777 ./sites/default/settings.ph
then run the Drupal installer by going to your site's url and then change the permissions back:
#chmod 644 ./sites/default/settings.ph
5) Create the administrator user
Run the install.php script by going with your browser or refreshing your url and create the administrator user.
You'll see a warning about the missing "files" directory and missing cron jobs.
6) Make a "files" directory and give ownership to the apache user:
# mkdir files
# chmod 770 files
# chown apache:apache files
If the apache user or group are not "apache", look in the /etc/paswd file or in the running processes (ps aux|grep httpd) for its name (www-data?)
Drupal will install a .htaccess file in this directory for protection when you go to "administer > site configuration.
And the installation is done!
I didn't like having the install.php and update.php in the public directory, so I moved them out of the way and I just can move them back if I need them.
The installation is pretty minimal, so you'll have to activate modules and permissions from the administration panel.
Installing themes:
To customize with a theme, just grab the theme tar file and extract it in the themes directory, for example:
# cd themes
# wget http://ftp.osuosl.org/pub/drupal/files/projects/aberdeen-5.x-1.4.tar.gz
# tar zxvf aberdeen-5.x-1.4.tar.gz
and the theme will automagically appear in the admin control panel.
A tip from a Drupal especialist: 2bits.com:
It is best if you install your own add on modules and themes under the sites/all/modules and sites/all/themes directory. This separates the contrib stuff from core Drupal and makes upgrades easier.
Some troubleshooting tips:
If you get in the web page an error message regarding permissions, and especially if the Drupal install is the first thing that is going into the web server, check that the 'sites' directory has enough permissions (chmod 755).
If you get an error mentioning that the database is unsupported or it's the wrong version, it may be simply that the database instance hasn't been created.

