Upgrading Openfire

This is just a quick note to remind myself of the procedure for upgrading the Openfire XMPP server.

Sorry, but getting old means the memory isn’t what is used to be.

Have tested with upgrades from 3.8.0 and 3.8.1 to 3.8.2 (the latest release as of this writing).

Here are the steps:

1. Download the release tarball.

2. Shut down the service ($OPENFIRE_HOME/bin/openfire stop).

3. Backup the file system (tar czf $OPENFIRE_HOME.tgz $OPENFIRE_HOME).

4. Backup the database (using mysqldump -u root -p openfire >openfire.sql).

5. Back up the following directories under $OPENFIRE_HOME:

tar czf conf.tgz conf
tar czf plugins.tgz plugins
cd resources
tar czf security.tgz security

6. Extract the contents of the new release over the existing $OPENFIRE_HOME.

7. Restore everything in the conf, plugins and resources/security directories over the new release files (cd $OPENFIRE_HOME; tar xzf conf.tgz; tar xzf plugins.tgz; cd resources; tar xzf security.tgz).

8. Restore any variable declarations in $OPENFIRE_HOME/bin/openfire. For example:

INSTALL4J_ADD_VM_PARAMS="-server -Xms4g -Xmx4g"

In deployments to over 4,000 users you will want your Java VM to be a bit larger than the standard 2G RAM. It is also always a good idea to explictly set the JVM being used to avoid problems after updates. Make these changes in the openfire start script so they will be invoked whether starting from the application directory or with the init script (I use a slightly modified copy of openfired under $OPENFIRE_HOME/bin/extra for my init script, installed to /etc/init.d and properly chkconfig’d on).

Restore recommended modifications to log file paths in $OPENFIRE_HOME/lib/log4j.xml:

<param name="File" value="../logs/debug.log" />
<param name="File" value="../logs/info.log" />
<param name="File" value="../logs/warn.log" />
<param name="File" value="../logs/error.log" />

Note: These changes set the log file location relative to $OPENFIRE_HOME, as shipped log writing does not work because the variable used, $openfire_home (all lower case), is not properly defined.

9. Start the service back up ($OPENFIRE_HOME/bin/openfire start).

After using this procedure a few times I’ve found that the service has to be restarted one additional time for the new version number to be reflected in the admin console, not sure why exactly, but there it is.

This entry was posted in System Administration on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).