Ejabberd Installation




Step 1

Download the latest version of ejabberd :
http://www.ejabberd.im/
I used ejabberd ver 2.0.5 Linux 32-bit for this installation.

gunzip ejabberd-2.0.5-linux-x86_64-installer.bin.gz
chmod +x ejabberd-2.0.5-linux-x86-installer.bin

Uncompress it and assign executable permission

./ejabberd-2.0.5-linux-x86-installer.bin

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




Step 2

vi /etc/rc.local
/opt/ejabberd-2.0.5/bin/ejabberdctl start

Add this line into rc.local to enable auto-start of ejabberd

/opt/ejabberd-2.0.5/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/
id: admin@im.example.com
pw: xxxxxx

Enter the username and password you created when installation in web admin interface authentication. You should be able to several menu items. Lets 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: Gajim, Pidgin, Soapbox, Psi, Exodus etc.

But I will suggest you use Gajim, it has the MSN similar interface and fully support HTTP proxy (Squid) for data transfer.

Download the latest Gajim for ejabberd client and install in client side:
http://www.gajim.org/




Step 3

Install and Enable HTTP proxy Squid for data transfer of Ejabberd IM client Gajim. It is the good solution to use proxy behind NAT for clients.

Install the Squid proxy with authenication in IM server and set client Gajim to use with port 3128.

P.S. I try proxy65(SOCK5 proxy) but it is not good support and installation. I think HTTP proxy is quite fast easy for installation and trouble-shooting.




Step 4 (Optional)

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_session 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, admi) 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.5/auth/jabber_ext_auth.php"}.
Save the config file and restart the ejabberd Server.

/opt/ejabberd-2.0.5/bin/ejabberdctl restart



Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.