Updating eGroupware in a FreeNas Jail
The version of eGroupware that is packaged in the FreeBSD ports tree has a base phpgwapi of 1.8.004 (as at 30 December 2013). There has been an update to the base package and this is now at version 1.8.005. The change log for the update is here.
This mini-guide describes the steps to update eGroupware running in a FreeNAS Jail
Before starting I would highly recommend reading the eGroupware Update Instructions found here. This post follows the steps there, but records the installation in to a FreeNAS jail, which isn’t covered in the documentation directly.
**** WARNING ****
Follow these instructions at your own risk. This process worked for me. This does not guarantee that it will work for you.
Backup all your data before performing any of these steps.
Before you start
Check your config user password
Make sure you have the user name and password to get into the setup program. This is the top option in the login screen shown here.
Backup your database
If, in the worst case your upgrade doesn’t go to plan you can restore the earlier version. If you are using phpMyAdmin you can use this, or you can use the command line utilities.
Get the software
There are pre-built RPMs at http://www.egroupware.org/download. The download I chose was the EGroupware 1.8 daily snapshot. This is near the bottom of the list. You can also download the tar.gz file from their sourceforge page.
As this was an upgrade, all the required prerequisites were already be in place, so nothing else was needed.
Copy the tar file across to your FreeNAS jail.
Installing the software
Unpack the software
I moved the
1.8-snapshot.tar.bz2 file to the
/tmp directory and unpacked it there.
root@groupware:/tmp # tar xvZf 1.8-snapshot.tar.bz2
This created the directory
/tmp/1.8-snapshot. Rename the directory to
eg (or whatever your application directory under
/usr/local/www is called. We will also change the ownership to the Apache user (www).
root@groupware:/tmp # mv 1.8-snapshot eg root@groupware:/tmp # chown -R www:www eg
Stop the web server
Make sure that no one is using the system and stop the web server
root@groupware:/ # service apache22 start
Change to the /usr/local/www directory and move existing instance of eGroupware to a backup directory.
We will then copy (or move) the new system across and then copy the working header.inc.php file from the original directory to our new one.
root@groupware:/tmp # cd /usr/local/www
root@groupware:/usr/local/www # mv eg eg-old
root@groupware:/usr/local/www # mv /tmp/eg .
root@groupware:/usr/local/www # cp eg-old/header.inc.php eg
root@groupware:/usr/local/www # ls eg
.htaccess doc groupdav.php login.php phpsysinfo sambaadmin timesheet
about.php egw-pear header.inc.php logout.php polls set_box.php tracker
addressbook emailadmin header.inc.php.template manual preferences setup webdav.php
admin etemplate home news_admin projectmanager sitemgr wiki
anon_wrapper.php felamimail importexport notifications redirect.php soap.php xajax.php
bookmarks filemanager index.php phpbrain registration status.php xmlrpc.php
calendar files infolog phpfreechat resources svn-helper.php
developer_tools groupdav.htaccess json.php phpgwapi rpc.php syncml
The new system should now be in place. Double check that the permissions are correct and that you’ve copied the
header.inc.php file across correctly.
Restart the Apache service
root@groupware:/usr/local/www # service apache22 start Performing sanity check on apache22 configuration: Syntax OK Starting apache22. root@groupware:/usr/local/www #
Check the configuration
Go to the setup screen (http://server/eg/setup.php). Use your sever name and path here.
Update any applications
At the main setup screen select option 5 (set up applications)
Total time required
Excluding the initial database backup which is dependent on your volume of data, the total time was less than 30 minutes. The amount of time the web service was down was a matter of minutes.