my life

day to day

DJabberd Debian HOWTO

August 11th, 2007

Checkout the latest SVN copy

svn co http://code.sixapart.com/svn/djabberd/ /usr/src/djabberd/

First install dependencies

apt-get install openssl libdbd-sqlite3-perl  libnet-ssleay-perl libnet-dns-perl libdigest-sha1-perl  libxml-sax-perl libxml-libxml-perl liblog-log4perl-perl subversion libdigest-hmac-perl libdanga-socket-perl libsys-syscall-perl

Now install DJabberd

cd /usr/src/djabberd/trunk/DJabberd/ perl Makefile.PL make all install

Now create the SSL certificates

mkdir /etc/djabberd cd /usr/src/djabberd/trunk/ openssl req -x509 -newkey rsa:1024 -keyout /etc/djabberd/server-key.pem -out /etc/djabberd/server-cert.pem -days 365 -nodes htdigest -c /etc/djabberd/djabberd.users djabberd [your-username-without-at-sign]

Create the server configuration file /etc/djabberd/server.conf

OldSSL  enable
# health checks from this IP (directive can be repeated) won't log and
# won't allocate a connection id
DeclareMonitor 127.0.0.1
AdminPort 5200
ClientPort 5222
ServerPort 5269
SSLCertificateFile    /etc/djabberd/server-cert.pem
SSLCertificateKeyFile /etc/djabberd/server-key.pem 

<VHost alliance.com>
  S2S enable
  RequireSSL yes
  <Plugin DJabberd::Authen::HTDigest>
    Realm djabberd
    HtDigest /etc/djabberd/djabberd.users
  </Plugin>
  <Plugin DJabberd::RosterStorage::SQLite>
    Database /etc/djabberd/djabberd.sqlite
  </Plugin>
  <Plugin DJabberd::Authen::MySQL>
    DBName               djabberd
    DBHost               127.0.0.1
    DBPort               6723
    DBUsername           dbusername
    DBPassword           dbpassword
    DBTable              user
    DBUsernameColumn     username
    DBPasswordColumn     password
    DBEncryptedPasswords 1
    DBWhere              canjabber = 1
  </Plugin> 

</VHost>

Start the server

/usr/local/bin/djabberd --conf=/etc/djabberd/server.conf --daemon

add to del.icio.us    add to technorati favs    email this

3 Responses to “DJabberd Debian HOWTO”

  1. Docunext Tech Stuff » Blog Archive » DJabberd on FreeBSD Says:

    [...] http://osterman.com/wordpress/2007/08/11/djabberd-debian-howto [...]

  2. Al Says:

    Hi Erik, thanks again for this howto. I finally got HTDigest working. I had originally tried to use an existing digest file and changed the realm, forgetting that the realm is used as the salt.

    I’m glad you mentioned the htdigest command doesn’t need the @ sign in the username, and I’ll add it doesn’t need the domain name either - ie username@example.com, only need username.

  3. Wahoo Says:

    Thank you for sharing!

Leave a Reply