Installing Openfire 3.9.3 on a clean CentOS 7 image.

Installing Openfire is pretty straightforward the simple RPM does pretty much all of the work for you. But here is a quick guide for those of you that have been struggling.

Download openfire:

wget http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire-3.9.3-1.i386.rpm

Run the following command

rpm -Uhv openfire-3.9.3-1.i386.rpm

If you don’t have java installed you’ll get the following error

Job for openfire.service failed. See ‘systemctl status openfire.service’ and ‘journalctl -xn’ for details.

A look at the log files will reveal no jre is installed:

less /opt/openfire/logs/nohup.out

nohup: failed to run command ‘/opt/openfire/jre/bin/java’: No such file or directory

Install Server JRE on your system

mkdir /usr/java

mv server-jre-8u20-linux-x64.tar.gz /usr/java

cd /usr/java

tar -zxvf server-jre-8u20-linux-x64.tar.gz

ln -s jdk1.8.0_20/ latest

vi /etc/profile.d/java.sh

Add the following to the java.sh file:

export JAVA_HOME=/usr/java/latest
export PATH=${JAVA_HOME}/bin:${PATH}

Then press escape type

:wq

and press enter

Openfire still will not start as we installed from the RPM and it includes its own JRE.

So edit the openfire file:

vi /etc/init.d/openfire

and scroll down and replace

OPENFIRE_RUN_CMD=”${JAVACMD}…

with

OPENFIRE_RUN_CMD=”/usr/java/latest/bin/java…

And thats openfire should start:

systemctl start openfire.service

2 thoughts on “Installing Openfire 3.9.3 on a clean CentOS 7 image.”

  1. Al ejecutar systemctl status openfire.service el siquiente delatalle:

    mar 18 18:22:06 informatica openfire[3314]: /etc/rc.d/init.d/openfire: líne…e
    mar 18 18:22:06 informatica openfire[3314]: /etc/rc.d/init.d/openfire: líne…o
    mar 18 18:22:06 informatica systemd[1]: openfire.service: control process ex…2
    mar 18 18:22:06 informatica systemd[1]: Failed to start SYSV: Openfire is an….
    mar 18 18:22:06 informatica systemd[1]: Unit openfire.service entered failed….

    Warning: Unit file changed on disk, ‘systemctl daemon-reload’ recommended.
    Hint: Some lines were ellipsized, use -l to show in full.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.