March 02, 2005

Jabberd on OS X

OK this will detail out how to get a local jabber server (jabberd-2.0s6) running on OSX. I needed this to start working out a new reporting mechanism which will communicate around the world via jabber. So what better place to do this then to have a local jabber server running. Here's how:

Step 1. - Get libidn

Go here and get libidn. This is needed by jabberd and OS X doesn't ship with it.

./configure
make
sudo make install

Step 2. - Get mysql

Go here and get and install the Standard mysql. This is also needed by a default jabber server - which is what we want.

This comes as a dmg so install it and the start-up script for mysql. Also the default installation is /usr/local/mysql - This is important because we need to know where the libraries are. To find this out:

cd <mysql install dir>/bin
mysql_config --libs

Remember this line as it defines where we need to look for libraries.. I got this from the docs..

Step 3. - Get jabberd

Go here and get the jabberd-2.0s6. Note the standard link on jabberd.org does work..

Now we want to compile mysql into this and let me say what a PITA!!! However, after debugging it I thing the right thing to do is two things. YMMV of course.

I edited the configure file on line 20269 from
for incpath in /usr/include/mysql /usr/local/include/mysql; do
to
for incpath in /usr/include/mysql /usr/local/mysql/include /usr/local/include/mysql; do

then I did ..

export LDFLAGS="-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm $LDFLAGS"; ./configure --enable-debug --sysconfdir=/etc/ --enable-mysql --with-extra-include-path=/usr/local/mysql/include --with-extra-library-path=/usr/local/mysql/lib

make

It should end with this - which is OK.

ld: warning empty table of contents: ../subst/.libs/libsubst.a (can't load from it)

sudo make install

From there it was a simple. I followed the instructions and added a few of my own..
Change the pid,db,and log file locations

Posted by Steven at 11:30 PM | Comments (0) | TrackBack