Install Ejabberd 2.0 on Ubuntu Hardy Heron 8.04 LTS - 6 Steps!
Problem:
You've chosen the most simple, solid Linux server - Ubuntu 8.04 LTS, and you want to run the most simple, solid XMPP server - ejabberd. BUT, the version of ejabberd in Hardy's repositories is the really old (Sep 03, 2007!) 1.1.4 release.
Solution:
You could of course build ejabberd from source, but that's not why you chose the "It Just WorksTM" Ubuntu server, is it? Have no fear. A simple and (mostly) painless solution awaits!
The key is in the Hardy-backports repository. Ubuntu Backports are updated versions of software that have not been fully tested with the default software packaged in the Ubuntu Installation. By default, the Ubuntu team only releases security updates and keeps all major versions of software constant throughout the release's lifecycle.
Backports are an option for brave souls that want the latest major versions of software on their still perfectly relevant (but chronologically gifted) operating system. I say "brave" souls because there is one serious issue with this:
So make sure you keep that in mind and carefully monitor the security bulletins of the writers of any software package you install from backports. Since we don't want every package to be upgraded to its non-security-checked newest backport version, we'll enable pinning. Pinning allows us to enable the backports repository only for those packages we specifically request from it.
Instructions:
Enough of the explanation, here's what you're reading this for.
1) First, we need to add the backports repository. Fire up your favorite text editor (beginners should probably use nano) and open `/etc/apt/sources.list`.
1 | sudo nano /etc/apt/sources.list |
and add these lines:
1 2 | deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse |
In my case, the lines were already there, and I just had to un-comment them. Your experience may vary.
2) Next, we'll enable pinning. Run:
1 | sudo nano /etc/apt/preferences |
and add these lines:
1 2 3 | Package: * Pin: release a=hardy-backports Pin-Priority: 400 |
3) Now all that's left is to update apt and install ejabberd. The '-t hardy-backports' line specifies that we want to get ejabberd from the backports repository:
1 2 3 4 | sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install build-essential sudo apt-get install -t hardy-backports ejabberd |
Or, you can do it all in one command:
1 | sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get install build-essential && sudo apt-get install -t hardy-backports ejabberd |
4) Once installation finishes, run:
1 | sudo nano /etc/ejabberd/ejabberd.cfg |
And change the following lines to set your domain name and admin user (make sure the domain name matches the output from the 'hostname' command):
1 2 3 4 5 6 7 8 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Options which are set by Debconf and managed by ucf %% Admin user {acl, admin, {user, "admin_username", "yourdomain.com"}}. %% Hostname {hosts, ["yourdomain.com"]}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
5) Now, restart ejabberd:
1 | sudo /etc/init.d/ejabberd restart |
6) Finally, create your admin user account:
1 | sudo ejabberdctl register username yourdomain.com password |
That's it! You're done! Enjoy your fully-functional, up-to-date XMPP server.
Possibly Related posts:

