blog
content
report
notice
supportProblem: 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 [...]"/>
rss
Home > Programming > Install Ejabberd 2.0 on Ubuntu Hardy Heron 8.04 LTS - 6 Steps!

Install Ejabberd 2.0 on Ubuntu Hardy Heron 8.04 LTS - 6 Steps!

November 12th, 2009 Leave a comment Go to comments
privacycopyrightparticipate

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:

The Ubuntu team does not release security updates for backported software!

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:

  1. Clamdscan in Ubuntu
  2. Projects
  3. Google's Chrome OS - First Impressions
store
  • http://johan-svensson.se/ Johan Svensson

    Thank you for a good shortcut to success! Good tips on how to use a specific backport without risking to upgrade all packages to backport versions. Now I finally have a jabber server under my control. :)

    • http://andrewensley.com/ Andrew

      Good news! I'm glad it helped you.

feed
advertise
privacy