Sunday, 30 March 2008

Drupal 5.2 on Ubuntu 7.10 with Postgresql backend

Installing Drupal 5.2 on Ubuntu 7.10 with Postgresql requires several steps.
  1. Install php_pgsql (the required files are not installed after selection of the database
  2. Manually create a database user and a database:
    createuser -D -A -P drupal5
    createdb -O drupal5 drupal5
    Using the automated setup scripts creates a database that is not owned by the drupal user. Later, the installation process will not be able to create the required tables. It seems that dbconfig-common has its trouble handling postgresql databases.
  3. Install drupal using
    apt-get install drupal5
    Choose to set up the database manually. The dialog is likely to frighten you away, but you have already done everything necessary.
  4. Change the ownership of the data files. The script changes /var/lib/drupal5 to www-data (with is what Apache needs to read files). However, the files are in /usr/lib/drupal5. As they are still owned by root -> Error messages.
    chown -R www-data:www-data /usr/lib/drupal5
    does the trick.
  5. In /etc/postgresql/8.x/main/pg_hba.conf add a line:
    host drupal5 drupal5 127.0.0.1 255.255.255.255 password
    allows drupal to access the local database.
  6. Restart Apache and Postgresql
  7. In a browser query the server:
    http://server/drupal5
    You should see the Drupal logon screen.
  8. Create an administrative user
As easy as this list of actions sounds and as clear it seem now what one has to do, it was hard to figure out from all the error messages where the problem lay.

There is a helpful link in the Ubuntu forum. It helped me understand what was going on durign the installation process.

1 comment:

Notebooks said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Notebook, I hope you enjoy. The address is http://notebooks-brasil.blogspot.com. A hug.