Archive

Posts Tagged ‘messaging’

Install and configure ejabberd jabber IM Server

July 9th, 2008

ejabberd, as described in its home page:
” ejabberd is a distributed, fault-tolerant technology that allows the creation of large-scale instant messaging applications.The server can reliably support thousands of simultaneous users on a single node and has been designed to provide exceptional standards of fault tolerance. As an open source technology, based on industry-standards, ejabberd can be used to build bespoke solutions very cost effectively.”

Instructions to install and configure ejabberd in CentOS 5 are as follows:

* Download the current stable version of ejabberd from its official site. While writing this article the stable version was 2.0.1. I’ve download the binary file for 64 bit machine:
# cd /opt
# wget http://www.process-one.net/downloads/ejabberd/2.0.1/ejabberd-2.0.1_2-linux-x86_64-installer.bin.gz

* Uncompress it and assign executable permission:
# gunzip ejabberd-2.0.1_2-linux-x86_64-installer.bin.gz
# chmod +x ejabberd-2.0.1_2-linux-x86_64-installer.bin

* Execute it:
# ./ejabberd-2.0.1_2-linux-x86_64-installer.bin

The installer begins and completes few steps like asking you to accept license, enter hostname for server (something like im.example.com), administrator username and password, select location (in my case, its /opt/ejabberd-2.0.1/) to install etc. It should install quickly without any problem.

* Start the Server:
# /opt/ejabberd-2.0.1/bin/ejabberdctl start

ejabberd will be started. You should be able to get its admin interface using port 5280. If your server has GUI installed, open your favourite browser and enter: http://localhost:5280/admin/, in case GUI not there (as common in Servers), you can follow SSH port forwarding tutorial from this site to access its Web Admin Interface in your machine.

Enter the username and password you created when installation in web admin interface authentication. You should be able to several menu items. Let’s create some users now for testing purposes: select ‘Virtual Host’ option, then the hostname of your server (initially you should see only one host i.e. im.example.com), select it. You should see several menu options, there’s an option there named ‘Users’. select it to create a new user and see the list of existing users, if any.

Update your DNS Server to include your new Jabber Server and Test it out with your favourite client. Some popular IM Clients which support Jabber are: Pidgin, Soapbox, Psi, Exodus etc.

Configure ejabberd
We will now update configuration of ejabberd to suite our taste. Please note that these settings are enitrely optional.

* Max Sessions: A user can connect/login from one location at a time. (by default, a user can simultaneously connect from 10 locations).
Solution: open config file (/opt/ejabberd-2.0.1/conf/ejabberd.cfg), jump to line number 333 and change default 10 to 1. or search for ‘max_user_sessions’ if you dont find the line.

* vCards: Better support for vCards, like easy searching for people.
Solution: Goto line 433 (or search for mod_vcard) and enter following inside capital brakets []:
{search, true}, {matches, infinity}, {allow_return_all, true}, {search_all_hosts, false}

* Administrative Rights: Assign admin rights to some users so that they can perform administrative tasks.
Solution: Goto line 306 (or search for ‘acl, admin’) and add lines for each user whom you want to assing admin rights, such as:
{acl, admin, {user, "admin", "im.example.com"}}.
{acl, admin, {user, "maharana", "im.example.com"}}.
{acl, admin, {user, "katrina", "im.example.com"}}.

* External authentication: Authentication from MySQL Database using external script.
Solution: Comment the line (no. 192 or nearby) which state: {auth_method, internal} and remove comments from line (no. 198 or nearby) and update it with your authentication script path, such as:
{auth_method, external}.
{extauth_program, "php /opt/ejabberd-2.0.1/auth/jabber_ext_auth.php"}.

Save the config file and restart the ejabberd Server.
# /opt/ejabberd-2.0.1/bin/ejabberdctl restart

General , , ,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes