Following on my previous post, the next stage is to add an XMPP server to the setup, in the form of ejabberd. As before, all the commands given are executing from our home directory, and in every case ubuntu01 should be substituted with the hostname (fully qualified) of the machine.
Before we start, a couple more pre-requisites in addition to the stuff we installed last time:
sudo apt-get install subversion sudo apt-get install libexpat1-dev
The next step is getting and compiling ejabberd. For reproducability, I’m grabbing a specific revision of the source from SVN, which at the time of writing is the current one anyway.
svn co -r 905 http://svn.process-one.net/ejabberd/trunk mv trunk ejabberd cd ejabberd/src ./configure make sudo make install cd ../..
Generating and installing an SSL certificate:
openssl req -new -x509 -newkey rsa:1024 -days 3650 \ -keyout privkey.pem -out server.pem openssl rsa -in privkey.pem -out privkey.pem cat privkey.pem >> server.pem rm privkey.pem sudo mv server.pem /etc/ejabberd/ssl.pem
Now we can configure and starting ejabberd. Before doing this, some of tinkering is required in /sbin/ejabberdctl to account for some issues in the Makefile. Specifically there is some confusion with the ROOTDIR variable, which I just removed completely. Some editing of ejabberd.cfg in /etc/ejabberd is also required, mainly to set the hostname and configure the S2S settings. Once this is done:
sudo ejabberdctl start
ejabberdctl register admin ubuntu01 passwordObviously replace password with an appropriate password. Next, edit ejabberd.cfg again and add a line to grant admin rights to the new admin user (it’s documented in the file), and restart ejabberd to allow the change to take effect:
ejabberdctl restart
You can now test the web interface by going to http://ubuntu01:5280/admin in a browser.
-
FYI – I’m trying to run these instructions with the latest version of trunk and I’m getting the following error when i ./configure:
./conftest.erl:6: can’t find include lib “ssl/include/ssl_pkix.hrl”
configure: error: could not compile sample programI’m trying to find a fix and I’ll update you if I can find anything.
-
Thanks Matt
-
Thanks it worked for me

7 comments
Comments feed for this article
Trackback link: http://ciarang.com/posts/compiling-ejabberd-on-ubuntu/trackback