Monday 24 June 2013

Upgrading/Installing Openfire on Elastix

Recently my Openfire installation on Elastix has been bugging me about a new release but whenever i attempt the upgrade, it doesn't get updated. running 'yum update openfire' gives me no new update available.
This is how i went about the solution.
I went online, found pieces of solution  here and there and brought them together and the solution is listed below.
Required solution is a SSH connection,i use putty.exe.
IMPORTANT: Make a backup of all relevant data, if this is a virtual machine(like mine), make a snapshot before continuing

Upgrading Openfire


1. Stop Openfire.

/etc/init.d/openfire stop


2. Backup the Openfire installation directory. This step is critical because the data will be overwritten with the new .tar.gz install.

cd /opt/
mkdir /opt/openfire_backup
cp -r /opt/openfire/* /opt/openfire_backup/
rd -rf /opt/openfire

3. Backup the Openfire database. Note that the embedded database is backed up in step 2.
4. Install the .tar.gz file (extract it over the current directory).

wget http://download.igniterealtime.org/openfire/openfire_3_8_2.tar.gz
tar zxvf openfire_3_8_2.tar.gz

5. Copy the conf directory from the backup to the installation directory.

cp -r ./openfire_backup/conf/* ./openfire/conf/

6. Copy the embedded-db directory from the backup to the installation directory.

mkdir ./openfire/embedded-db
cp -r ./openfire_backup/embedded-db/* ./openfire/embedded-db/


7. Copy the enterprise directory from the backup to the installation directory, if it exists.

mkdir ./openfire/enterprise
cp -r ./openfire_backup/conf/* ./openfire/enterprise/

8. Copy the plugins directory from the backup to the installation directory except for _plugins/admin_.

cp -r ./openfire_backup/plugins/* ./openfire/plugins/

9. Copy modified files located in resources/security from the backup to the installation directory.

cp -r ./openfire_backup/resources/security/* ./openfire/resources/security/

***in my case i mistakenly ran 
cp -r ./openfire_backup/resources/* ./openfire/resources/     which resulted in my certificates rendered invalid till i had to renew them

10. Start Openfire
/opt/openfire/bin/openfire start

if you get a java error, install java

INSTALLING JAVA

mkdir /usr/java
cd /usr/java/
wget http://sdlc-esd.sun.com/ESD6/JSCDL/jdk/7u21-b11/jre-7u21-linux-i586.tar.gz?AuthParam=1369894084_a266b30ec0975da50a3950ef2d6afd23&GroupName=JSC&FilePath=/ESD6/JSCDL/jdk/7u21-b11/jre-7u21-linux-i586.tar.gz&File=jre-7u21-linux-i586.tar.gz&BHost=javadl.sun.com

tar zxvf jre-7u21-linux-i586.tar.gz
rm -rf jre-7u21-linux-i586.tar.gz


Now repeat step 10 i.e
/opt/openfire/bin/openfire start


When it is restarted, goto 'http://openfireserveraddress:9090' (secure connection won't be available now)
from there, you can do the normal startup configuration, every data/information will be in place, all you have to do is just to ok all the steps and skip the password setup page and you're good to go with a new version of Openfire. Once all is good, restart the server and your secured admin console port(i.e 9091) will now be available.

Another thing i noticed was that i had to delete my gateway clients(i.e users facebook/yahoo/google info) had to be deleted and re-entered before they could work, apart from that little inconvenience,every thing else was fine.


3 comments:

  1. Hi, when i start the Openfire and i got an error " nohup: appending output to `nohup.out"

    Any ideas please?

    Cheers

    ReplyDelete
  2. It`s not an error, it`s the output whenever you start the server. Openfire will be up and running.

    ReplyDelete