replace drupal with pressflow
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.
- Open a CLI on the host ifw03.
- Use su to switch to the root account.
- 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.t... 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#
- 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#
- 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.
- Stop the web server.
ics01:~# /etc/init.d/apache2 stop Stopping web server: apache2 ... waiting ... ics01:~#
- Back up current drupal directory
ics01:~# tar cf /var/tmp/drupal6.tar /usr/share/drupal6/ ics01:~#
- 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#
- 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.
- back up /usr/share/drupal6-test/sites/default/settings.php
ics01:/usr/share# cd /usr/share/drupal6/sites/default ics01:/usr/share/drupal6/sites/default# cp settings.php settings.php-old ics01:/usr/share/drupal6/sites/default#
- copy default.settings.php to settings.php
ics01:/usr/share/drupal6/sites/default# cp default.settings.php settings.php ics01:/usr/share/drupal6/sites/default#
- Edit settings.php.
ics01:/usr/share/drupal6/sites/default# vi settings.php <?php // $Id: default.settings.php,v 1.8.2.4 2009/09/14 12:59:18 goba Exp $ ... "settings.php" 252 lines, 9926 characters
- find the line
$db_url = 'mysql://username:password@localhost/databasename';
- Replace with
require_once('dbconfig.php'); 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.
- Back up /etc/hosts
- Edit /etc/hosts
- 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.
- go to URL http://web01.planetlarg.com/drupal6/update.php
- 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 NULLThere is one failure. An index does not exist so it can't be dropped.Failed: ALTER TABLE {url_alias} DROP INDEX src_languageThe status page may complain about "Drupal core update status".
run
Start the web server.
- start apache2
ics01:/etc/php5/apache2# /etc/init.d/apache2 start Starting web server: apache2. ics01:/etc/php5/apache2#
check your work
troubleshoot

