Install OpenFire

5 de março de 2018

How To Install Openfire XMPP Server on a Debian or Ubuntu VPS

Introduction

In this article, Openfire XMPP server will be installed on a Ubuntu server. This article has been tested using Ubuntu 12.04, but it should work on all Debian-based systems. For this article, I'll assume your Droplet runs on the IP 1.1.1.1.

What is XMPP?

The full name of XMPP is Extensible Messaging and Presence Protocol. It is a real-time communication protocol (which includes chat) based on XML. It has long been known as Jabber; however, as Jabber was not the only software relying on XMPP, it has been renamed to XMPP. If you want to know more about XMPP, please see their official website.

What is Openfire?

Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the XMPP protocol and can be managed via a web interface. It is easy to setup and configure, but has a high level of security and performance. It runs using Java.
*It should be noted that with Openfire, no chat is possible yet. A client is needed: Openfire cannot be used alone, just like web servers need a browser.

Installing

Before installing Openfire, Java should be installed. First run a quick update on apt-get:
sudo apt-get update
Now check whether Java has already been installed by executing the following command:
java -version
If it returns "The program java can be found in the following packages", Java hasn't been installed yet so execute the following command:
sudo apt-get install default-jre
Now you'll need to download Openfire. Using your browser on your own PC, visit the download section on the Openfire website. Click Linux and then click the Debian package, which will be named something likeopenfire_3.8.2_all.deb. On the next page, cancel the download and copy the link from click here. Now download it onto your virtual server using:
wget -O openfire.deb <copied link>
At time of writing, this would be:
wget -O openfire.deb http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.8.2_all.deb
This will download the Openfire Debian package to openfire.deb. Now install it:
sudo dpkg --install openfire.deb
Openfire has now been installed and has already been started. Now visit http://1.1.1.1:9090/. Follow the setup wizard.
On the second page I suggest you choose the domain name your server will be running on as Domain. Otherwise, set it to the Droplet's public IP:
Set to your IP
Now go to the next step. If you don't have an external connection you want to use for the server, leave the database settings to embedded Database. On the next page, you'll probably want to select Default as for the other systems you need to setup LDAP or Clearspace.
After the setup procedure finishes, you can login to the admin console using the username admin and the password you just chose.

Basic settings

Users

If you want to have a secured server where only logged-in users can connect, visit Server Settings -> Registration & Login and disable the appropriate options. For a fully secured server, this will look like this:
Fully secured
The next thing that needs to be done is adding users. Visit Users/Groups and click Create New User and fill out the form.

Group Chat

Group chat rooms can be created by visiting Group Chat -> Create New Room. The Room ID will be suffixed by @conference.HOSTNAME. The @conference can be changed by visiting Group Chat Settings. Here a new service can be created. If you now want to create a new room, you will be asked which service to use. These names are very important for clients, so make sure that they make sense.

Plugins

Plugins can also be installed by going to Plugins. There are a few already listed if you visit Available Plugins, and they can extend the server. Just click the button under Install to install a plugin and it should be installed within a few seconds. All plugins provide different options, so I won't go into that.

Clients

To connect to your VPS, there are a lot of clients available. An incomplete list can be found at the website of the XMPP Standards Foundation. The client provided by the same company that created the Openfire server is Spark. Use whichever client fits your needs the best.
If you are writing your own client, you can use a library provided by the same company that made Openfire, Ignite Realtime. They have a library for Java called Smack. There are a lot of libraries for other languages on the internet.

Starting And Stopping Openfire

Openfire should start automatically when you start the Droplet.
If you want to stop Openfire, you can do that using:
sudo /etc/init.d/openfire stop
To start it again, execute:
sudo /etc/init.d/openfire start

fonte:https://www.digitalocean.com/community/tutorials/how-to-install-openfire-xmpp-server-on-a-debian-or-ubuntu-vps

0 comentários:

Postar um comentário

Veja outras Publicações