Documentation

Upgrading to Debian 8

Performing the upgrade

It is possible to upgrade from HUBzero 2.1.x running on Debian 7 "wheezy" to HUBzero 2.1.x running on Debian 8 "jessie".  It is a manual process due to the wide range of possible site configurations there could be. So you will need to adapt to the specific needs of your HUBzero installation. The steps outlined below have been tested on the HUBzero 2.1.x VMWare virtual machine images that were made available on the HUBzero website. This environment had particular issues with limited disk space that complicates the process somewhat.

Some instructions will differ depending on how your site was installed. We have highlighted items like passwords, template names, and hub names which you may need to substitute with values specific to your hub. The text given here is valid for the HUBzero 2.1.x VMware virtual machine images that were made available on the HUBzero website.

Be careful if you use cut and paste. Some commands will consume all standard input which will cause subsequent commands pasted to not get executed. The steps below are intentionally broken down into chunks that avoid this problem.

You will have to perform the upgrade as the root user.

You changed your root password right? If hubzero2015 is still your root password you really must change it as soon as possible.

You changed your MySQL root password right? If hubzero2015 is still your MySQL root password you really must change it as soon as possible.

 

Update Debian7

We are assuming you are running Debian 7.x right now. If you aren't then you may need to modify this section. The goal here is to get your current operating system version all the way up to date.

apt-key adv --keyserver pgp.key-server.io --recv-keys 143C99EF
apt-get update
apt-get dist-upgrade -y

While running it will ask you a few interactive questions which you will want to answer as follows:

  • read and dismiss ('q') apt-listchanges output
  • let it restart services if asked

In the case of the HUBzero 2.1.x VMware virtual machine image the Network Time Protocol daemon isn't installed so the time and date on the site could be wrong. While not critical it can eliminate a number of warning errors that might otherwise be confusing.

apt-get install -y ntp

We initiate a manual time update and add a 10 second delay at the end to give it enough time to take effect.

ntpd -gq
sleep 10

This is a good spot to clean up a little in case your system has limited disk space for later package updates. Autoremove any packages no longer needed.

apt-get autoremove -y

Then remove all the cached installation packages from the system

apt-get clean

Re-run the hubzero openvz configuration in case there was an OpenVZ kernel update

hzcms configure openvz --enable

Reboot the machine to ensure that any packages (especially kernel) are fully applied.

reboot

Update HUBzero 2.1.x

Now we update the existing HUBzero installation:

hzcms update

Upgrade to Debian 8

It is now time to update Debian to 8.x. We will do this in a couple steps in order to reduce disk usage which is necessary when trying to apply this procedure to the VMware virtual machine image that was distributed for HUBzero.

In order to free up disk space the upgrade we will remove the hubzero-texvc and tex-common packages temporarily

apt-get purge -y hubzero-texvc tex-common
Then remove all the cached installation packages from the system
apt-get clean

Then change the package repositories to Debian jessie (8.x).

cat << HERE >  /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

deb http://packages.hubzero.org/deb ellie-deb8 main

deb http://download.openvz.org/debian wheezy main
deb http://download.openvz.org/debian jessie main
HERE
Update package database
apt-get update

Then perform the full distribution upgrade:

apt-get dist-upgrade -y

While running it will ask you a few interactive questions which you will want to answer as follows:

  • read and dismiss ('q') apt-listchanges output
  • Disable SSH password authentication for root? No
  • let it restart services when asked
  • /etc/sysctl.conf update (Y, install the package maintainer's version)
  • /etc/logrotate.d/apache2 update (Y, install the package maintainer's version)
  • /etc/php5/apache2/php.ini update (install the package maintainer's version)
  • /etc/updatedb.conf update (Y, install the package maintainer's version)
  • /etc/default/spamassassin update (Y, install the package maintainer's version)

 

Remove packages no longer required.

apt-get autoremove -y

Remove cached packages again to keep disk usage low for systems where that is a concern.

apt-get clean

Re-install some of the TeX dependency chain (done separately to conserve disk space)

apt-get install -y texlive-latex-base

We remove cached packages again to keep disk usage low for systems where that is a concern.

apt-get clean

Re-install hubzero-texvc

apt-get install -y hubzero-texvc

We remove cached packages again to keep disk usage low for systems where that is a concern.

apt-get clean

Rebuild man-page database in case we ran out of disk space during install

mandb
Now we reapply the current HUBzero updates to the current instance and let it reapply any configuration that may have been undone by the operating system upgrade. We also re-enable openvz so that their configuration files get updated (they may have been replaced during the operating system upgrade).
service nscd restart
hzcms update
hzcms configure openvz --enable
Reboot to ensure we are still properly configured with OpenVZ kernel.
reboot
Remove any packages that are no longer required
apt-get autoremove -y

Remove all the cached installation packages from the system

apt-get clean
 

Updating the HUBzero Tool Container Image

Finally it is necessary to update your tool container image.

**Check disk space before before updating the tool container image.

If using a Debian 6 tool container image edit the container image's repository configuration (do this step OR the next):

chroot /var/lib/vz/template/debian-6.0-amd64-maxwell

cat << HERE >  /etc/apt/sources.list
deb http://archive.debian.org/debian squeeze main contrib non-free
deb http://archive.debian.org/debian squeeze-lts main contrib non-free
deb http://packages.hubzero.org/deb ellie-deb6 main
HERE
cat << HERE >> /etc/apt/apt.conf

Acquire::Check-Valid-Until false;

HERE
apt-key adv --keyserver pgp.mit.edu --recv-keys 143C99EF
apt-get update

 

If using a Debian 7 tool container change into the image's context (do this step OR the previous):

cp /etc/resolv.conf /var/lib/vz/template/debian-7.0-amd64-maxwell/etc/resolv.conf

chroot /var/lib/vz/template/debian-7.0-amd64-maxwell
wget http://packages.hubzero.org/deb/hubzero-signing-key.asc -q -O - | apt-key add -
Update package database
apt-get update

 

Once inside the container image context we install the hubzero-policyrcd package which will prevent all future package installations and updates for this container image from stopping or restarting services (which would start/stop services running on the host which would not be a good thing.

apt-get install -y hubzero-policyrcd

Some packages require access to the /proc filesystem to get information about the system. So we mount this special filesystem inside the container image chroot environment for the duration of the update then unmount it

mount -t proc proc /proc

Do the package upgrade

apt-get dist-upgrade -y

After the upgrade is complete unmount the temporary /proc

umount /proc

Remove any packages no longer required

apt-get autoremove -y

Lastly we remove any cached packages from the image in order to conserve disk space.

apt-get clean

Exit the chroot environment and go back to the host computer environment.

exit

 

Conclusion

That's it. Your hub should now be upgraded to Debian 8.x and HUBzero 2.1.x

Your tool container images remain Debian 6 or 7 as it may be necessary to update your tools for Debian 8 and that process is outside the scope of this document.

Last modified:

  • Copyright © 2022 Hubzero
  • Powered by Hubzero®