DJabberd Debian HOWTO

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

Related posts:

  1. MogileFS HOWTO
  2. Swish-e RPM HOWTO
  3. DWL-122 + Debian HOWTO
  4. Java + Firefox + Debian
  5. Creating a Bootstrapped Debian Image

3 comments

  1. 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.

  2. Wahoo says:

    Thank you for sharing!

Leave a Reply

Your email address will not be published. Required fields are marked *

*