Today we are going to install the Openfire XMPP server on CentOS 5.x. Openfire is extremely flexible and powerful and can be easily integrated into an existing IT infrastructure. It is written in Java, has tons of plugins and is released under the GPL so it can be freely modified and redistributed.
Note :: you will need to have MySQL installed before installing Openfire
First, download the CentOS RPM from the Ignite Realtime website. At the time of the writing the current version is 3.6.2, but you may want to check the site for an newer version.
wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.6.2-1.i386.rpm
Then simply install the RPM file
rpm -ihv openfire-3.6.2-1.i386.rpm
A MySQL database must be created for the openfire service. The following commands will log in to mysql as the root user and create a database openfire. Then create a user openfire , grant the user all privileges to the new database and set the users password. The final command flush privileges; simply reloads the user privileges for MySQL to ensure the new user has the access we have set up.
mysql -u root -p
create database openfire;
grant all on openfire.* to openfire@localhost identified by 'password';
flush privileges;
exit
Next, start the openfire service
/etc/init.d/openfire start
Note :: if you want openfire to start automatically when the server boots, run the following command:
chkconfig --add openfire
Once the service has been started, open a web browser and navigate to http://192.168.x.x:9090 where 192.168.x.x is the ip address of your server running openfire.
The installer is fairly self explanatory, choose your language and domain name.
On the Database Settings screen choose Standard Database Connection and click continue
Here we will use the information from the database we set up previously:
Database Driver Presets: MySQL
JDBC Driver Class: com.mysql.jdbc.Driver
Database URL: jdbc:mysql://localhost:3306/openfire
Username: openfire
Password: password
Next, choose default under Profile Settings and create your administrator account.
Note :: port 5222 must be available to all clients in order to connect
That's it. Now you can create users and connect any XMPP Instant Messaging client to your server.
There are a ton of options in the administration console so dig in and have fun!