How To Install And Configuring OpenFire XMPP Chat server on centos 6.5


INTRODUCTION:
Extensible Messaging and Presence Protocol (XMPP) is a communications protocol for message-oriented middleware based on XML (Extensible Markup Language). The protocol was originally named Jabber and was developed by the Jabber open-source community in 1999 for near real-time, instant messaging (IM), presence information, and contact list maintenance. Designed to be extensible, the protocol has also been used for publish-subscribe systems, signalling for VoIP, video, file transfer, gaming, Internet of Things applications such as the smart grid, and social networking services.

Unlike most instant messaging protocols, XMPP is defined in an open standard and uses an open systems approach of development and application, by which anyone may implement an XMPP service and interoperate with other organizations’ implementations. Because XMPP is an open protocol, implementations can be developed using any software license; although many server, client, and library implementations are distributed as free and open-source software, numerous freeware and commercial software implementations also exist.


OPENFIRE:
Openfire (previously known as Wildfire, and Jive Messenger) is an instant messaging (IM) and groupchat server that uses XMPP server written in Java.

According to igniterealtime.org, Openfire is a real time collaboration (RTC) server licensed under the Open Source GPL. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire offers rock-solid security and performance.

Openfire supports the following features:
  • Web-based administration panel
  • Plugin interface
  • Customizable
  • SSL/TLS support[2]
  • User-friendly web interface and guided installation
  • Database connectivity (i.e. embedded Apache Derby or other DBMS with JDBC 3 driver) for storing messages and user details
  • LDAP connectivity
  • Platform independent, pure Java
  • Full integration with Spark IM client
  • The proprietary extension to Openfire allows multiple server instances to work together in one clustered environment
So you want to set up your own private chat network for friends or family, or maybe your company uses the major chat providers like AIM, Yahoo, MSN, or Google for interoffice communication, but you want more control and to keep the network traffic inside your LAN. Whatever your case may be, this guide will show you how to do it with Ignite Realtime’s Openfire Jabber Server for Centos 6.
INSTALLATION:

Before installing Openfire ,we have to complete two  preliminary steps. Those two steps are setting up a DNS alias for the server host name and creating a MySQL database for the backend instead of using the included embedded database.

# yum install java libldb.i686 mysql-server mysql-connector-java

Create the MySQL Database for Openfire Data
Sometimes a tool like phpMyAdmin comes in handy for managing MySQL databases, however I don’t have it installed on this server. Instead I’ll be adding my Openfire database from the MySQL console. All we need to do is create the database, add an user account that has full control over that database, and reload (flush) the privileges.
# mysql -u root -p
# mysql> CREATE DATABASE openfire;
# mysql> GRANT USAGE ON openfire.* TO ‘root’@’localhost’ IDENTIFIED BY ‘ur_password′;
# mysql> FLUSH PRIVILEGES;
# mysql> quit;
# chkconfig –level 235 mysqld on

Openfire can be downloaded from the Ignite Realtime web site, We’ll start by downloading the Openfire RPM via wget.

# wget http://download.igniterealtime.org/openfire/openfire-3.8.1-1.i386.rpm

# rpm -ivh openfire-3.8.1-1.i386.rpm

# service openfire start
# chkconfig –level 235 openfire on

Open Ports in your Firewall
If you have a firewall in place you’ll need to open some ports before we can start configuring Openfire through its web interface. Openfire uses ports 5222, 7777, 9090, 9091 for client connections, file transfer proxy, http web administration and the secured administration respectively. If you use iptables tables like I do, add these lines to your/etc/sysconfig/iptables rules file and reload.

# vi /et/sysconfig/iptables
-A INPUT -p tcp -i eth0 –dport 5222 -j ACCEPT
-A INPUT -p udp -i eth0 –dport 5222 -j ACCEPT
-A INPUT -p tcp -i eth0 –dport 7777 -j ACCEPT
-A INPUT -p udp -i eth0 –dport 7777 -j ACCEPT
-A INPUT -p tcp -i eth0 –dport 9090 -j ACCEPT
-A INPUT -p udp -i eth0 –dport 9090 -j ACCEPT
-A INPUT -p tcp -i eth0 –dport 9091 -j ACCEPT
-A INPUT -p udp -i eth0 –dport 9091 -j ACCEPT
Then reload iptables to accept the new directives.
# iptables-restore < /etc/sysconfig/iptables


Configure Openfire through its Web Interface
Launch your favorite browser and go to http://yourserver_ip_address:9090 or if you set up a DNS alias http://server.mydomain.com:9090 to go to the Openfire web interface. You’ll be greeted by Openfire’s setup tool. In the first step, select your language. Here we choose English.




The next step is to set the server domain. If you opted for an IP address name, enter your server’s IP. If you opted to create a DNS alias, enter the DNS server domain. Here we created server.sixthstartech.com so we’ll enter that. By default the Openfire web interface console ports are 9090 and 9091 for standard and secure respectively.



You have two choices regarding which database to use for Openfire to store its data: an external database like MySQL, MSSQL, PostgreSQL, etc… or to use the bundled embedded database. If you setup a MySQL database like we did in this guide then select the Standard Database Connection option. If you didn’t, the only choice is to use the Embedded Database.


To set up your database connection, select the appropriate driver from the Database Driver Presets list (we set up a MySQL database so we’ll select MySQL). The page will refresh and you need to fill in the necessary information (the database host, name, username, and password). You should have this information from when you setup your MySQL database. Per this guide, MySQL is on the same server as my Openfire installation (localhost) and I created a database called ‘openfire’ with a username of ‘root’ and set a password.





The profile step has to do with the users and groups of chat members and where Openfire will store that information (new users, user groups, etc…). We won’t opt for LDAP to store this information. It is much more convenient to save it in our in our database.

Enter the administrator email address (your email address) and set a password for your Openfire server.




Click the Login to admin console button.

Type in the Openfire admin password you entered in Step 6 and click the Login button.



Creating Users.

Go to Create New User under the Users section on the left. Fill in the Username,Password, and Confirm Password fields and click the Create User button.



Setting up a Openfire Client (Spark 2.5.8 for Windows)
Download Spark, install it, and launch it.
Type in your Openfire user credentials (Username and Password). In the Serverfield, type in the Openfire Servers IP address or DNS alias. Click the Login button.


Now i install spark in two machines.








That's IT. Enjoy UR Self with Own XMPP Chat Server!!!

Comments

Popular posts from this blog

Step By Step Configuration Cisco VoIP Phone in Cisco Packet Tracer.

How To Setup Social Publishing CMS (Content Managemnet System) Using Pligg in CentOS 6.5