Setup ejabberd on Ubuntu Hardy Heron
Posted by Vince Wadhwani on May 28, 2008
If you've ever wanted to run your own private Instant Messaging Server, you'll be pleased to know that it's a fairly simple process. I'm no expert on the topic, but I will show you how to get started.. you can lock it down using help from the experts later on. With those caveats out of the way, let's get going.
Step 1: Update and Upgrade + Tools Been there, done that? Good, you can skip this step. Otherwise pls follow along:
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install build-essential
Step 2: Grab ejabberd It's unfortunate that Hardy is still using version 1.1.4 of ejabberd when they're actually on 2.0.1 right now. Still, I tried to compile from scratch and ran into all sorts of trouble. At the end of the day I don't know what improvements 2.0 brings but do know that 1.1.4 does everything I want so I'm sticking with it for simplicity. If you like simplicity then you're at the right place:
sudo apt-get install ejabberd
Step 3: modify your configuration file By default Debian will give you a configuration file for ejabberd that won't quite work right. You'll need to modify some lines for your local domain. First, make sure you have a hostname and domain set up in /etc/hosts and /etc/hostname. If your computer is called redplume for instance you might use just redplume or redplume.foo.com. Pick something and roll with it.
You'll need to be root to get to the file using autocomplete so use sudo su to do that and then edit the file and make some changes as follows. These replace text inside your ejabberd.cfg, do not use this as a full replacement for that file!
%%% Hostname
{hosts, ["domain.ext"]}.
%%% ACCESS CONTROL LISTS
{acl, admin, {user, "yourusername", "domain.ext"}}.
Step 4: Startup With step 3 out of the way, let's restart the ejabberd service, and register a user:
sudo /etc/init.d/ejabberd stop sudo /etc/init.d/ejabberd start sudo ejabberdctl register yourusername domain.ext yourpassword
If you got an error after the last command then something obviously went wrong. Go back through the .cfg file and make sure that you have the domain set up correctly.
Step 5: Login and new users You can now point your web browser to your domain and login using the username and password you created in Step 4 assuming that you set up the Access control list correctly in Step 3. The url to access is going to be localhost:5280/admin You'll be prompted for a username and password.
Once you're in, navigate through the menus (ug, I hope those are improved in 2.0.1) and create some users. There are plenty of resources online that show how to setup the client so I wont' go into that here.
Good luck and happy chatting!
Hi,
I think we’ve covered much the same stuff, but we also had to re-build our ssl certificate to stop Adium complaining when connecting.
http://sysmonblog.co.uk/?p=11
Thanks for the article - was helpful trying to figure this out.
Jamie