replace drupal with pressflow

Primary tabs

Oak Ridge Automatic Computer and Logical Engine, 1953

introduction

copy http://cluster.planetlarg.com/mediawiki/index.php/Install_pressflow

Replace drupal with pressflow. Pressflow is a version of drupal made by fourkitchens.com. Many stock parts are replaced with after-market parts to make it go faster.

download

Almost every application I want is provided by the Debian distribution. Pressflow is not.

I can't use Debian's PMS (Package Management System) to install it. MMM is not in Debian's repository either, but at least the MMM people provide a Debian package. The fourkitchens people don't even do that. Crickey! Shocking. Still, no pain, no gain.

  1. Open a CLI on the host ifw03.
  2. Use su to switch to the root account.
  3. Download the first of the files with the wget application.
    ifw03:~# cd /var/tmp
    ifw03:/var/tmp# wget  http://launchpad.net/pressflow/6.x/6.19.96/+download/pressflow-6.19.96.tar.gz
    --2010-12-23 10:46:39--  http://launchpad.net/pressflow/6.x/6.19.96/+download/pressflow-6.19.96.tar.gz
    Resolving launchpad.net... 91.189.89.223, 91.189.89.222
    Connecting to launchpad.net|91.189.89.223|:80... connected.
    HTTP request sent, awaiting response... 303 See Other
    Location: http://launchpadlibrarian.net/58073905/pressflow-6.19.96.tar.gz [following]
    --2010-12-23 10:46:39--  http://launchpadlibrarian.net/58073905/pressflow-6.19.96.tar.gz
    Resolving launchpadlibrarian.net... 91.189.89.228, 91.189.89.229
    Connecting to launchpadlibrarian.net|91.189.89.228|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1288096 (1.2M) [application/x-tar]
    Saving to: `pressflow-6.19.96.tar.gz'
    
    100%[======================================>] 1,288,096   1002K/s   in 1.3s
    
    2010-12-23 10:46:40 (1002 KB/s) - `pressflow-6.19.96.tar.gz' saved [1288096/1288096]
    
    ifw03:/var/tmp#
    
  4. Spread it around. Copy the file to ics01.
    ifw03:/var/tmp# scp pressflow-6.19.96.tar.gz ics01-adm01:/var/tmp/
    root@ics01-adm01's password: Pa55w0rd
    pressflow-6.19.96.tar.gz                      100% 1258KB   1.2MB/s   00:00
    ifw03:/var/tmp#
    
  5. Copy the file to the other customer service hosts ics02 and ics03.

install

Install on ics01. Repeat this procedure for the other customer service hosts ics02 and ics03.

  1. Stop the web server.
    ics01:~# /etc/init.d/apache2 stop
    Stopping web server: apache2 ... waiting ...
    ics01:~#
    
  2. Back up current drupal directory
    ics01:~# tar cf /var/tmp/drupal6.tar /usr/share/drupal6/
    ics01:~# 
    
  3. Create a symlink with the same name as the pressflow directory in the tar file. This will force tar to write pressflow files over the top of drupal files.
    ics01:~# cd /usr/share/
    ics01:/usr/share# ln -s drupal6/ pressflow-6.19.96
    ics01:/usr/share# 
    
  4. copy pressflow over top of drupal. This preserves Debian's symlinks such as /usr/share/drupal6/profiles -> /etc/drupal/6/profiles
    ics01:~# cd /var/tmp
    ics01:/var/tmp# gunzip pressflow-6.19.96.tar.gz
    ics01:/var/tmp# 
    ics01:/var/tmp# cd /usr/share
    ics01:/usr/share# tar xf /var/tmp/pressflow-6.19.96.tar
    ics01:/usr/share# 
    

configure

There are two parts to configuration. One is pointing drupal to the mysql database.

  1. back up /usr/share/drupal6-test/sites/copy.planetlarg.net/settings.php
    ics01:/usr/share# cd /usr/share/drupal6/sites/copy.planetlarg.net
    ics01:/usr/share/drupal6/sites/copy.planetlarg.net# cp settings.php settings.php-old
    ics01:/usr/share/drupal6/sites/copy.planetlarg.net# 
    
  2. copy default.settings.php to settings.php
    ics01:/usr/share/drupal6/sites/copy.planetlarg.net# cp default.settings.php settings.php
    ics01:/usr/share/drupal6/sites/copy.planetlarg.net#
    
  3. Edit settings.php.
    ics01:/usr/share/drupal6/sites/copy.planetlarg.net# vi settings.php
    
  4. find the line
     $db_url = 'mysql://username:password@localhost/databasename';
    
  5. Replace with
    require_once('/add_customer_services/replace_drupal_pressflow/dbconfig.html');
    if (!isset($dbserver) || empty($dbserver))
            $dbserver='localhost';
    $db_url = "$dbtype://$dbuser:$dbpass@$dbserver/$dbname";
    
    This links the drupal settings file to the Debian settings file.

Drupal will try to contact itself using the web site name I give it (web01.planetlarg.com). It will fail to ge a response from the IP address 200.0.0.10. The status report will show an error for "HTTP request status". Override this with a hosts file entry.

  1. Back up /etc/hosts
  2. Edit /etc/hosts
  3. Add these lines.
    #
    # a fix for HTTP request status problem. 
    # http://drupal.org/node/222454
    192.168.3.2 web01.planetlarg.com
    

A couple of the modules need updating (system and dblog) from drupal v6.6 to pressflow v6.19.

  1. go to URL http://web01.planetlarg.com/drupal6/update.php
  2. Start update. A list of results is displayed in a mix of English, SQL and jibberish.
    The following queries were executed
    system module
    Update #6052
    
        * ALTER TABLE {menu_router} ADD INDEX tab_root_weight_title (tab_root(64), weight, title)
    ...
    dblog module
    Update #6000
    
        * ALTER TABLE {watchdog} CHANGE `referer` `referer` TEXT DEFAULT NULL
    
    There is one failure. An index does not exist so it can't be dropped.
     Failed: ALTER TABLE {url_alias} DROP INDEX src_language
    
    The status page may complain about "Drupal core update status".

run

Start the web server.

  1. start apache2
    ics01:/etc/php5/apache2# /etc/init.d/apache2 start
    Starting web server: apache2.
    ics01:/etc/php5/apache2#
    

check your work

troubleshoot