Install Openfire XMPP Server on CentOS 8 | CentOS 7

Posted on 30 views

Welcome to our guide on how to install Openfire XMPP Server on CentOS 8 | CentOS 7. Openfire is a powerful instant messaging (IM) and chat server that uses XMPP/Jabber protocol. Openfire is a very popular Messaging (Chat) and Presence Server,It is the base for a range of products that use XMPP and as it says, it is Extensible, which means that its capabilities can be increased, especially with Plugins like Asterisk IM plugin and many more.

For Ubuntu installation, checkout: How to install Openfire on Ubuntu

XMPP( Extensible Messaging and Presence Protocol) is a widely adopted open protocol for instant messaging. It is a real-time communication protocol (which includes chat) based on XML.
Openfire provides cool features like:

  • MySQL,Oracle,PostgreSQL and embedded database support for user details and massages storage.
  • LDAP integration support
  • Support both TLS and SSL for security
  • Web GUI configuration manager
  • Spark IM client integration
  • A lot of plugins to extend its functionality
  • Clustering to avoid single point of failure
  • Integrating with other external IM servers

Let’s now kickstart the installation of Openfire XMPP Server on CentOS 8 | CentOS 7.

Step 1: Update system

The first step will be to update CentOS 8 / CentOS 7 system.

sudo yum -y update
sudo yum -y install wget curl

Step 2: Install Openfire on CentOS 8 | CentOS 7

Download Openfire latest package. The version we’ll install in this article is 4.6.

wget -O openfire.rpm

Once the Openfire package is downloaded, install it on CentOS 8 | CentOS 7 by running the command below.

sudo yum localinstall ./openfire.rpm

Accept installation prompt by pressing the key in your keyboard.

libtiff                                    x86_64                4.0.9-15.el8                                        AppStream                   188 k
 libxcb                                     x86_64                1.13-5.el8                                          AppStream                   230 k
 lua                                        x86_64                5.3.4-11.el8                                        AppStream                   193 k
 pango                                      x86_64                1.42.4-6.el8                                        AppStream                   298 k
 pixman                                     x86_64                0.36.0-1.el8                                        AppStream                   256 k
 ttmkfdir                                   x86_64                3.0.9-54.el8                                        AppStream                    62 k
 tzdata-java                                noarch                2019c-1.el8                                         AppStream                   189 k
 xorg-x11-font-utils                        x86_64                1:7.5-40.el8                                        AppStream                   103 k
 xorg-x11-fonts-Type1                       noarch                7.5-19.el8                                          AppStream                   522 k
 avahi-libs                                 x86_64                0.7-19.el8                                          BaseOS                       62 k
 cups-libs                                  x86_64                1:2.2.6-28.el8                                      BaseOS                      433 k
 dejavu-fonts-common                        noarch                2.35-6.el8                                          BaseOS                       74 k
 dejavu-sans-fonts                          noarch                2.35-6.el8                                          BaseOS                      1.5 M
 fontconfig                                 x86_64                2.13.1-3.el8                                        BaseOS                      275 k
 fontpackages-filesystem                    noarch                1.44-22.el8                                         BaseOS                       16 k
 gdk-pixbuf2                                x86_64                2.36.12-5.el8                                       BaseOS                      467 k
 libpkgconf                                 x86_64                1.4.2-1.el8                                         BaseOS                       35 k
 lksctp-tools                               x86_64                1.0.18-3.el8                                        BaseOS                      100 k
 pkgconf                                    x86_64                1.4.2-1.el8                                         BaseOS                       38 k
 pkgconf-m4                                 noarch                1.4.2-1.el8                                         BaseOS                       17 k
 pkgconf-pkg-config                         x86_64                1.4.2-1.el8                                         BaseOS                       15 k
Installing weak dependencies:
 gtk2                                       x86_64                2.24.32-4.el8                                       AppStream                   3.4 M
Enabling module streams:
 javapackages-runtime                                             201801                                                                               

Transaction Summary
Install  57 Packages

Total size: 86 M
Total download size: 46 M
Installed size: 208 M
Is this ok [y/N]: y

Open all the required ports in the firewall.

sudo firewall-cmd --zone=public --add-port=9090/udp --permanent
sudo firewall-cmd --zone=public --add-port=9090/tcp --permanent 
sudo firewall-cmd --zone=public --add-port=9091/udp --permanent
sudo firewall-cmd --zone=public --add-port=9091/tcp --permanent
sudo firewall-cmd --reload

Start and enable the service.

sudo systemctl start openfire
sudo systemctl enable openfire

Confirm service status:

$ systemctl status openfire
 openfire.service - SYSV: Openfire is an XMPP server, which is a server that facilitates XML based communication, such as chat.
   Loaded: loaded (/etc/rc.d/init.d/openfire; generated)
   Active: active (running) since Sat 2020-05-23 19:22:59 CEST; 23s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2323 ExecStart=/etc/rc.d/init.d/openfire start (code=exited, status=0/SUCCESS)
 Main PID: 2350 (java)
    Tasks: 0 (limit: 24408)
   Memory: 1.3M
   CGroup: /system.slice/openfire.service
           ‣ 2350 /etc/alternatives/jre/bin/java -Dlog4j.configurationFile=/opt/openfire/lib/log4j2.xml -server -DopenfireHome=/opt/openfire -Dopenfire>

May 23 19:22:58 systemd[1]: Starting SYSV: Openfire is an XMPP server, which is a server that facilitates XML based commun>
May 23 19:22:58 su[2337]: (to daemon) root on none
May 23 19:22:58 su[2337]: pam_unix(su:session): session opened for user daemon by (uid=0)
May 23 19:22:58 su[2337]: pam_unix(su:session): session closed for user daemon
May 23 19:22:58 openfire[2323]: Starting openfire:
May 23 19:22:59 systemd[1]: Started SYSV: Openfire is an XMPP server, which is a server that facilitates XML based communi>

Step 3: Access Openfire Console to finish setup

Access Openfire Web interface on the Server using the IP address or server hostname and port 9090. On the first prompt choose installation language:


Select your default language then click Continue.  On Server setup window, set your domain and click Continue button.



For Database Settings, choose Embedded Database and click “Continue“.



Select Default option on Profile Settings; You can later add external authentication mechanisms like LDAP


Set admin user email address and password:


Login to Openfire console in the next page.




Enjoy using Openfire.


You now have Openfire installed on CentOS 8 | CentOS 7 Linux.


Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.