Openfire is free to user chat service based on XMPP and very convenience, super easy to install and use. However, it is base on opensource so it may include bug that can be annoy sometime.
So, let’s start with prerequisite….
Prerequisite
Rename your server hostname to your desire then restart hostnamectl service to apply change.
hostnamectl set-hostname <your-desire-hostname>
systemctl restart systemd-hostnamed
In order to be function correctly, you need to name your XMPP domain same as your server FQDN for smooth server to server connection. |
install library needed by openfire
yum -y install glibc.i686
Download Openfire installation file using wget then install it
wget http://igniterealtime.org/downloadServlet?filename=openfire/openfire-4.4.0-1.x86_64.rpm
yum -y install openfire-4.4.0-1.x86_64.rpm
Name Record for S2S
You can choose between adding your FQDN to your /etc/hosts or put it in into you local DNS Server
Open /etc/hosts and set your server name in there
nano /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.1 myservername.example.com myservername
and then save, and reload network or reboot your server.
According to xmpp wiki, there are 2 record called srv record need to be inserted into your dns server. For example
_xmpp-client._tcp.example.net. 86400 IN SRV 5 0 5222 example.net.
_xmpp-server._tcp.example.net. 86400 IN SRV 5 0 5269 example.net.
NB : changes example.com with your domain name on those example records above.
the _xmpp-client is used for IM Client connection to openfire, and the _xmpp-server is used for server 2 server connection.
Install DB for Openfire with MySQL or MariaDB
you can use MySQL or MariaDB for openfire, choose which once is suite for you.
Create database with name you desired
CREATE DATABASE <your desire name>;
Create username and password use for installation process
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
Now, grant all privilege to the user to allow access to the database you just created
GRANT ALL PRIVILEGES ON <openfiredbname>.* TO 'username'@'localhost' IDENTIFIED BY 'password';
Installation
Open address link set in your local DNS with port 9090
http://your-server-fqdn:9090
Now after the setup page open, choose your language you would like to use
choose language page
When you press next, you will see that openfire setup already input the xmpp domain name and server FQDN and also set the port for accessing admin page, just check it and make sure everything is correct and then press continue
on the database setting, select “standard database connection”, then press continue
Choose database type that will use by openfire to store the data, and change HOSTNAME to where you install the database and change DATABASENAME with your database for openfire you previously created
Just let everything as it is in profile setting.
In administration account. If you want to change default password set by the installation process , you can change it here, after that press continue
Now the installation will process all the data you input in all the step you’ve been following, wait for “login to admin page” appear.
Now you ready to use your openfire as internal messaging server for you company.