20131019 upgrading openfire - plembo/onemoretech GitHub Wiki

title: Upgrading Openfire link: https://onemoretech.wordpress.com/2013/10/19/upgrading-openfire/ author: phil2nc description: post_id: 6533 created: 2013/10/19 19:30:23 created_gmt: 2013/10/19 23:30:23 comment_status: closed post_name: upgrading-openfire status: publish post_type: post

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: cd $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_JAVA_HOME_OVERRIDE=/usr/lib/jvm/java
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.

Copyright 2004-2019 Phil Lembo