ELS Howto: Drupal CMS


Synopsis

This document describes how to configure a Web Content Management System (Web CMS) on Elemental Linux Server (ELS) using the Drupal content management platform with a SQLite3 database.


Prerequisites

These instructions assume that you have a working PHP-enabled web server and a working email system. If you do not, see the ELS Howto: Apache and PHP and the ELS Howto: Remote Mail before beginning this document.

You may also want to install the imagemagick package from the 'Additional Applications' CD-ROM.


Installation

Installation instructions for Drupal are available on the Drupal web site. This document will guide you through the specifics of installing it with the SQLite3 database tools bundled with ELS.

  1. Download the latest version of Drupal from http://www.drupal.org and extract it into your web server's document root directory.
  2. Create a symbolic link with the name of your site that points to the drupal-X.yy directory.
  3. Apply the SQLite query.inc fix from http://drupal.org/node/1611828
  4. Copy the default.settings.php file in drupal-X.yy/sites/default to settings.php in the same directory.
  5. Set the owner of the drupal-X.yy/sites/default directory, and it's descendants, to the same user that httpd is running as.
  6. Create a directory for the SQLite database that is outside of the web server's document root.
  7. Change the ownership of the database directory to the same user that httpd runs as.

Example

The following example shows how you would install Drupal 7.15 if your web server document root were /home/httpd and your SQLite databases were stored in /home/sqlite.

cd /home/httpd
wget http://ftp.drupal.org/files/projects/drupal-7.15.tar.gz
tar --no-same-owner -zxf drupal-7.15.tar.gz

ln -s drupal-7.15 site

wget http://www.ibiblio.org/elemental/howto/drupal-7.15-query.inc.patch
patch -p0 <drupal-7.15-query.inc.patch

cd drupal-7.15/sites/default
cp default.settings.php settings.php

cd ..
chown -R daemon default

mkdir /home/sqlite

chown daemon /home/sqlite

Configuration

Configuration of Drupal is done through a web browser interface and is most easily performed from a client workstation with a graphical browser.

  1. Point your web browser to the base URL of your site and follow the installation wizard.
  2. When prompted for the database filename, enter the relative path to your sqlite database directory and a filename for your database.
  3. Verify that the installation completes successfully.
  4. Finish the installation using the Drupal documentation as a guide.

Example

The following example show the settings for a database called 'drupal.sqlite' that is stored in the /home/sqlite directory.

Database file:
  ../../sqlite/drupal.sqlite

Testing

Testing of the configuration is done as you follow the web-based install procedure and possible remedies to common errors are displayed in the browser. However there are a few things that can be checked if you cannot access the Drupal configuration page.

  1. Check that PHP is installed properly. There is a good test script at http://www.htmlite.com/php003.php
  2. Run netstat -tlnp | grep httpd to verify that httpd is listening on port 80.
  3. Verify that firewall rules allow unrestricted access for on port 80 for any hosts trying to access your blog.
  4. Test network connectivity to the server by pinging it from another machine.

For additional help with installation and configuration, please refer to the Drupal home page.