Adding & Upgrading Modules

The Plugin Manager module is useful to search and upgrade modules.  It is linked to the software that tracks the status of modules (whether they are out of date) this link, however, is not perfect.

  1. Check Status of the sytem: http://www.embeddedsystemsaustralia.com.au/admin/reports/status
  2. Check Modules are Up to Date: http://www.embeddedsystemsaustralia.com.au/admin/reports/updates/list
  3. Use Plugin Manager to guess and update modules (ideally should match list in (2) above): http://www.embeddedsystemsaustralia.com.au/admin/plugin_manager/update

Manual Download and Install

If Plugin Manager is not detecting the correct software to install then a manual download and install is required. Here is an example of manually upgrading the Backup Migrate module:

  1. Connect to web server esa-web.ext.nicta.com using Putty.
  2. Login: local-admin
  3. Password: Ask Neil Temperley for this.
  4. Put Drupal into maintenance mode: http://www.embeddedsystemsaustralia.com.au/admin/settings/site-maintenance
sudo -i
NEWTAR=backup_migrate-6.x-1.2.tar.gz
MODULE=${NEWTAR%%-*}
echo ${NEWTAR%%-*}
cd /opt/lampp/htdocs/drupal/sites/all/modules
wget http://ftp.drupal.org/files/projects/$NEWTAR
mv $MODULE $MODULE.old
# Note: Check above is OK before this next step!
tar xvf $NEWTAR
rm $NEWTAR
  1. Run update: http://www.embeddedsystemsaustralia.com.au/update.php
  2. Put Drupal out of maintenance mode: http://www.embeddedsystemsaustralia.com.au/admin/settings/site-maintenance
  3. Done!

Drupal Core Files Upgrade

Follow the upgrade notes in the new drupal distribution.  Note: Upgrades to core files is a major headache mainly because you are supposed to disable all contributed modules before proceeding! 

  1. Put the site off-line for maintenance: http://www.embeddedsystemsaustralia.com.au/admin/settings/site-maintenance
  2. Backup all the database: http://www.embeddedsystemsaustralia.com.au/admin/content/backup_migrate
  3. Disable all contributed modules [remember which ones you were using!]: http://www.embeddedsystemsaustralia.com.au/admin/build/modules
  4. Use Putty to log in to the server as user local-admin
  5. The following Unix commands can act as a useful guide [change the filenames accordingly]:
# Change user to root:
sudo -i
cd /opt/lampp/htdocs
# Set a bash environment variable to the correct new drupal version name:
NEW=drupal-6.XX
# Set a date variable too:
DATE=`date +%Y%m%d`; echo $DATE
# Get the new version:
wget http://ftp.drupal.org/files/projects/$NEW.tar.gz
# Backup all:
tar -czvf $DATE-esa_all.tar.gz drupal/
# Extract new drupal version:
mv drupal drupal-old
tar -xvpf $NEW.tar.gz
mv $NEW drupal
# Fix ownerships:
chown -R local-admin drupal
chgrp -R local-admin drupal
# Move across old sites directory to new installation:
cd drupal
mv sites sites.orig
mv ../drupal-old/sites .
# Copy across the style sheet used when printing newsletters:
mv misc/print.css  misc/print-old.css
cp ../drupal-old/misc/print.css  misc
cd ..
# Restart Apache
/opt/lampp/lampp restart
# Cleanup
rm $NEW.tar.gz
  1. Run Update http://www.embeddedsystemsaustralia.com.au/update.php
  2. Check for modules that need updating. http://www.embeddedsystemsaustralia.com.au/admin/reports/updates/list
  3. Put the site back on-line: http://www.embeddedsystemsaustralia.com.au/admin/settings/site-maintenance