Setting Up an XMPP Server with ejabberd

Medical Technology, Healthcare & Government IT

Category Groups

Setting Up an XMPP Server with ejabberd

apt-get update && sudo aptitude safe-upgrade
apt-get install build-essential

Need to install Erlang for ejabberd.

Prerequisite Packages for Erlang

sudo apt-get install fop
sudo apt-get install openjdk-6-jdk
sudo apt-get install libncurses5-dev
sudo apt-get install unixodbc-dev
sudo apt-get install libssl-dev
sudo apt-get install libwxbase2.8
sudo apt-get install libwxgtk2.8-dev
sudo apt-get install libqt4-opengl-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install xsltproc

Download Erlang source

cd /home/roni_baby/setup
tar -zxvf otp_src_R16B.tar.gz
cd otp_src_R16B
make install

Download ejabberd source

tar -zxvf ejabberd-2.1.12.tgz
cd ejabberd-2.1.12/src
make install

Once it successfully installed, open its configuration file using

vi /etc/ejabberd/ejabberd.cfg

Go to the host section and edit it accordingly

{hosts, ["",""]}.

Go to the module section of this config file do enable the modules as per out requirements

Start ejabberd service using

/sbin/ejabberdctl start
/sbin/ejabberdctl status
/sbin/ejabberdctl stop

Create and register ejabbered user with

ejabberdctl register roni roni123

Getting the error message “Can’t register user testadmin@ at node ejabberd@localhost: not_allowed” when i try to register new users in ejabbered

for fixing this above error i used the following in its configuration file

{access, register, [{allow, admin}, {deny, all}]}.

I can able to register users successfully after this

Then login to Ejabbered admin login via

How to enable BOSH module in Ejabbered:- It allows to embed XMPP requests in an HTTP packet

We will first enable BOSH module in configuration

{5280, ejabberd_http, [
      {["http-bind"], mod_http_bind}

Then, like other modules, we will enable it in the few lines after,

{mod_http_bind, []}

restart Ejabbered server. You can also check the BOSH access is properly configured by browsing the page
Original Link