There are lot of ways to install ejabberd on Ubuntu like from operating system specific package, install it from source code etc. I will prefer to install it from source code so I am going to write steps for the same. Although initially it is little bit lengthy process but after this you will get latest version of ejabberd, sometimes we don’t get latest version when we install from os specific package also you will know how to compile ejabberd source code and if you have source code with knowledge of erlang you can customize it as well that will help you when you will install modules in Ejabberd. These steps are tested on Ubuntu 14.04 LTS (32 bit).
Please follow below steps one by one to install ejabberd on Ubuntu.
Step 1. Clone Ejabberd latest source code from the github repository.
git clone git://github.com/processone/ejabberd.git ejabberd
Step 2. Run below command to create configure script in the root folder of ejabberd
./autogen.sh
You may get the following error while running above command:
./autogen.sh: line 2: aclocal: command not found ./autogen.sh: line 3: autoconf: command not found
So if you get above error then run this command
apt-get install automake
then run
./autogen.sh
Step 3. Install Erlang to compile ejabberd source code if this is already not installed in your system. You can follow this URL (https://www.erlang.org/downloads) to install Erlang.
Step 4. To compile ejabberd run the following command.
./configure make
Step 5. To install ejabberd, run this command with system administrator rights (root user):
sudo make install
Step 6. Start Ejabberd with the following command.
ejabberdctl start
Step 7. Create admin account from Ubuntu terminal and update admin account information in ejabberd.yml. Ejabberd don’t update this configuration file because this may override your custom changes. That’s why we have to do it manually.
ejabberdctl register <user_name> <host_name> <password>
Step 8. Now go into /etc/ejabberd/ejabberd.yml file and find ACCESS CONTROL LISTS section, in this section change acl configuration like below.
admin: user: - "admin": "localhost"
In the above user, section admin is the user name of the admin account and localhost is hostname.
Step 9: Access ejabberd admin panel using http://example.com:5280/admin. It will ask you for user name and password. Enter the user name and password of the admin created by you in step 7.
Keep visiting us for more blogs on XMPP and Ejabberd.
Feel free to comment if you face any difficulty in installing ejabberd.
Happy Coding !!
Leave a Reply