What is XMPP?
Extensible Messaging and Presence Protocol (XMPP) is an open XML technology for real-time communication, which powers a wide range of applications including instant messaging, presence and collaboration.
You can find the overall explanation here.
This series of post will cover the server setup and implementing chat in android client.
Part 1 – Server setup (this post)
Part 3 – Registering user on server.
Part 6 – One-to-one chat using XMPP.
Part 7 – Group chat using XMPP
Lets start with downloading the server setup from here. Download the latest version as per your system I will be using ubuntu for this article.
After completing the download, copy the .zip file in the place where you want to setup the server.
Now open the terminal and navigate to the folder where you copied the downloaded zip file.
Now we need to extract the downloaded file. For extracting the zip file use below command.
- tar -xvzf openfire_3_6_4.tar.gz
After the completion of executing this command, navigate to the bin directory in openfire folder. To navigate follow below command.
- cd openfire/bin/
Now to make openfire executable, use below command.
- chmod +x openfire
Now as you have make the openfire executable, you can check the status of the openfire, by using following command.
- ./openfire status
It will returned the status of the open fire, whether it is connected or stopped. If you find the status as stopped, you can execute below command to start the open fire server.
- ./openfire start
After successful execution of the above command, you will received the message as started in the terminal window.
Now you can visit the http://localhost:9090/ in you browser window to start the server configuration. Now we will see the basic configuration of the openfire server.
You will find window as shown below once it is loaded.
Once you select the language for your server, click continue. After this you will find the screen as shown below.
In this screen you can see your domain name, please note your domain name as it will be required while setting up your client. Click on continue after you are done with server setting. You will see below screen after clicking continue.
In the above screen, you can configure your database settings. Foe now i am selecting the embedded database. After selecting and configuring the database, click on continue. You will see the below screen for profile setting.
In this screen, you can set how to save the profile of the user or admin. For now i am keeping it default. After selecting the profile setting, click on continue to create the admin access. You will be asked to enter the password for admin access. Your admin name will be by default “admin”. After setting the password, you will asked to login as admin to see the server data. Below screen will be shown after successful admin creation.
Now click on login to admin to login in admin panel. A new screen will appear which will ask you to enter admin id and password.
NOTE : Your first time login will fail, so don’t worry, just refresh the window and enter the admin login password again.
On successful login you can view the admin panel of your openfire as shown below.
That’s it. You configured your own local server for using XMPP.
We will see the client configuration in next part of this series.
Hit like if it helped!