Configure ejabberd xmpp on ubuntu server Part-1

Configure ejabberd xmpp ubuntu server

 

configure ejabberd xmpp ubuntu server

configure ejabberd xmpp ubuntu server

 

After facing so many issues and investing so many hours I write below steps for configure ejabberd. In first tourial we learn how to configure ejabbere on AWS EC 2 Ubuntu server. In second tutorial we will configure it with mysql.

Step 1: First Update Ubuntu Server  with following commands

sudo apt-get update        # Fetches the list of available updates
sudo apt-get upgrade       # Strictly upgrades the current packages
sudo apt-get dist-upgrade  # Installs updates (new ones)

 Step 2: sudo apt-get install ejabberd– this command will install ejabberd  on ubuntu machine.

Step 3: After complete installation of ejabberd , you need to register a user , you can register user below command

ejabberdctl register admin XXX.com password

Here admin — user name of user

XXX.com  – your domain name

password : user password

if above command show error then you need to register user with localhost domain .

ejabberdctl register admin localhost password

Step 4 : After successfully registration of  user , you can edit domain in ejabberd.cfg (ejabberd Configuration file) , path of this file is /etc/ejabberd/ejabberd.cfg . now you can open this file using vi  editor sudo vi ejabberd.cfg. 

now you can search below section and edit with you domain name

%% Admin user
{acl, admin, {user, "admin", "xxx.com"}}.

%% Hostname
{hosts, ["xxx.com"]}.

Now restart ejabberd server with following command sudo service ejabberd restart

if this command didn’t work then you can start ejabberd server by alternative command sudo /etc/init.d/ejabberd start

Step 5 : Now you can check server is running by hitting below URL : http://xxx.com:5280/admin  (here xxx.com is your domain name )

if above url is not loaded  i.e. ejabberd server is not started  , then please check status of ejabberd sudo service ejabberd status

if it shows  server is  already stopped then you can run sudo service ejabbered startn 

or or sudo /etc/init.d/ejabberd start

if this didn’t work then you can run following command sequentially for stop ejabberd server on any node

1. sudo /etc/init.d/ejabberd stop  - to stop ejabberd 
2. sudo killall ejabberd  -  kill all ejabberd process 
3. sudo killall beam - kill all beam process
4. sudo killall epmd
5. sudo service apache2 restart
6. sudo service ejabberd start  or sudo /etc/init.d/ejabberd start

 

Step 6 : now repeat step 5 again and enter user name and password that you have registered by running this command  ejabberdctl register admin localhost password

user name : admin@xxx.com

password : password

 

Step 7 :  Now you can test ejjaberd XMPP on server using any XMPP client like pidgin .

 

 

You may also like...

%d bloggers like this: