Monday, March 18, 2013

Openfire : Installation and Configuration Guide




Overview :
Openfire is a powerful instant messaging (IM) and chat server that implements the XMPP protocol. This document will guide you through installing Openfire.

Download :
please visit the Openfire website to download latest Openfire server: http://www.igniterealtime.org/projects/openfire/

Files in the Distribution :
The files in your distribution should be as follows (some sub-directories omitted for brevity):

openfire/
 |- readme.html
 |- license.html
 |- conf/
 |- bin/
 |- jre/
 |- lib/
 |- plugins/
     |- admin/
 |- resources/
     |-database/
     |-security/
 |- documentation/
  • The conf directory is where Openfire stores configuration files.
  • The bin directory contains the server executables. Depending on which distribution you installed, different executables will be available.
  • The jre directory contains a Java 5 runtime that is bundled with the Windows and RPM versions of Openfire.
  • The lib directory contains libraries necessary for running Openfire.
  • The plugins directory contains server plugins. By default, Openfire ships with a web-based admin console plugin.
  • The resources/database directory contains SQL schema files to create new Openfire databases, as well as upgrade scripts for existing installations.
  • The resources/security directory is where Openfire maintains keystores to support SSL connection security.
  • The documentation directory contains server documentation.

Installation :

Windows
Run the Openfire installer. The application will be installed to c:\Program Files\Openfire by default.

If using the .tar.gz, extract the archive to /opt or /usr/bin:
tar -xzvf openfire_3_0_0.tar.gz
mv openfire /opt

From a console window, you can run the following commands:
openfire-service /install -- installs the service.
openfire-service /uninstall -- uninstalls the service.
openfire-service /start -- starts the service
openfire-service /stop -- stops the service.

You can also use the Services tool in the Windows Control Panel to start and stop the service.

You will likely want to run Openfire as a standard Windows service after initial setup. If you used the Windows installer, a openfire-service.exe file will be in the bin directory of the installation. You can use this executable to install and control the Openfire service.

Note: the .tar.gz build does not contain a bundled Java runtime (JRE). Therefore, you must have JDK or JRE 1.5.0 (Java 5) or later installed on your system. You can check your java version by typing "java -version" at the command line and (if necessary) upgrade your Java installation by visiting http://java.sun.com.

Running Openfire in Linux/Unix
Choose either the RPM or tar.gz build. If using the RPM, run it using your package manager to install Openfire to /opt/openfire:
rpm -ivh openfire_3_0_0.rpm

# /etc/init.d/openfire
Usage /etc/init.d/openfire {start|stop|restart|status|condrestart|reload}
# /etc/init.d/openfire start
Starting openfire:

If you are running on a different Linux/Unix varient, and/or you have used the .tar.gz 'installer', you can start and stop Openfire using the bin/openfire script in your Openfire installation:

Ubuntu OS
# ./openfire
Usage: ./openfire {start|stop}
# ./openfire start
Starting openfire

Mac OS X
Openfire gives option to download installer file (.dmg) for mac os x same like windows. just you need to install and run that executable file and you are good to go.

Note: If you are running on a Red Hat or Red Hat like system (CentOS, Fedora, etc), we recommend using the RPM as it contains some custom handling of the standard Red Hat like environment. Assuming that you have used the RPM, you can start and stop Openfire using the /etc/init.d/openfire script.

Setup Overview :
To complete the installation of Openfire, you'll need to perform each of the following steps:

Setup the Database
Openfire can store its data in an embedded database or you can choose to use an external database such as MySQL or Oracle. If you would like to use an external database, you must prepare it before proceeding with installation. All database schemas can be found in the resources/database directory of the Openfire installation.

Setup the Server
A web-based, "wizard" driven setup and configuration tool is built into Openfire. Simply launch Openfire (platform-specific instructions below) and use a web browser to connect to the admin console. The default port for the web-based admin console is 9090. If you are on the same machine as Openfire, the following URL will usually work: http://127.0.0.1:9090. Initial setup and administration can also be done from a remote computer using LAN IP address instead or hostname if it is resolvable by the remote computer. Windows Server administrators should add http://127.0.0.1 address to Internet Explorer's Trusted Sites list, if Enhanced Security configuration is enabled in Internet Explorer. Otherwise they will get a blank screen.

Admin Console
After completing the above steps, Openfire will be configured and you can use the web-based admin console to administer the server. The URL should be the same as you used to setup the server unless you changed the port during the setup. Below are the screenshot to setup admin console.

When you go to the above address the setup will start and you would have to select your language, then click the Continue button.



On this step of the configuration you can change the domain and ports however as it automatically gets the server name most people can leave that as it is, click on the Continue button.


Now you can configure the database settings, you can pick the easy way and choose the Embedded Database or if you have got a WordPress instance of a forum running on your WHS then you would have a MySQL database and this is a Standard database connection in the Openfire Server world.
If you want to run a MySQL database keep checking this site as we will be uploading a guide. But it is better running Openfire on a Standard database connection as there is more feature open to you. 


You have to choose which external database (Standard database connection) once you select the database type then you will have to type in all the details such as the username and password. 
Then click on the Continue button once you are finish completing the details, it may take up to 1 minute if you have everything correct.


On the Profile settings since the WHS can’t run Active Directory natively then select the Default option.


You will now need to setup an administrator account, try not to use the same password as your WHS administrator.  Enter an email address, note that you can enter something like: admin@whs.local if you do not want or trust the software but I used my real email address and have not collected any unwanted emails from Openfire.

Once you complete this you can click the Continue button.

Remember: if you prefer to use a hard to remember passwords then write them down.



Once you specified the Administrator credentials, click on the continue button which will complete the installation and configuration of Openfire.


Click on “Login to the admin console” and authenticate using your previously configured administrator credentials.



Plugins :
Plugins add additional features and protocol support to Openfire. After setting up your Openfire installation, you may want to download and install plugins to enhance your server. Plugins can be installed directly inside the administration console.

Installing/Managing Plugins
If you download a plugin from inside the Openfire administration console, it will automatically be installed. If you manually download the plugin (packaged as a .jar file), you can deploy it by copying the plugin file to the plugins/ directory of your Openfire installation. A plugin monitor will automatically extract the plugin into a directory and install the plugin in Openfire. You may also use the "upload plugin" feature in the admin console (under the Plugins tab) to load a plugin from your local file system to the server. below are the steps to install & manage the plugins.

References :
Share:

6 comments:

  1. how to setup mysql Database ? please help me i want to create im using openfire.

    ReplyDelete
    Replies
    1. Hello Aryan,

      Check below steps if you want to setup mysql database for openfire.
      1) Install MySQL Server
      2) Create blank openfire schema
      3) Create openfire user in database and allocate grant of openfire schema to that user.
      4) Now in openfire admin console at selection of database settings, select standard database connection
      5) Select MySQl from the list of database driver presents.
      6) Fillup the details of your database connection url and all other things
      7) Finish all the needed steps in admin console and you are good to go..

      Let me know if you still have any doubt or issue.

      Delete
  2. how yo setup mysql database ?
    which tools must have yo create IM using openfire

    ReplyDelete
    Replies
    1. Hello Aryan,

      Creating IM is depend upon technology on which you are working now.

      For Android :
      - Openfire is also providing Android Library for IM, its name is Smack API.

      For iOS :
      - There are so many Jabber libraries available which you can integrate.

      For Java :
      - Smack API is also works for Java Projects.

      For Other technologies :
      - I think any jabber api / library will work with openfire IM server.

      Sorry for late reply!!!

      Delete
  3. SSL Handshake Failed while configure pidgin

    ReplyDelete
  4. I want to thank you for writing this article.This is great Article for me. It also more very informative & awesome. I expect more articles from you in future.
    XMPP

    ReplyDelete