Jabber服务器之djabberd
2013-06-08 13:46:08 阿炯

本站赞助商链接,请多关照。 DJabberd是一个高性能、高可扩展的Jabber/XMPP服务器框架。将它进行部署后,它提供一系列基础类,使你通过应用XML等方式,在不用了解jabber内部细节的情况下构造自己的Jabber服务器。采用GPLv2授权协议。


操作系统平台:主要是 Linux, (Perl写的,其他平台应该也支持)

djabberd 使用 epoll 技术,理论上单台服务器可以支持更多用户。Djabberd目前主要应用在LiveJournal上,支持大部分XMPP协议,稳定性也不用置疑。但是因为推出时间尚短,很多细节功能可能需要时间慢慢完善。有测试称DJabberd 使用 1GB 内存单处理器可以支持 300K 连接。

DJabberd is a high-performance, scalable, extensible Jabber/XMPP server framework. While it comes with an example server, it's really a set of classes for you to build your own Jabber server without understanding Jabber. Instead of working with XML and protocol-specific details, you subclass parts and work with sane objects and data structures and let DJabberd do all the ugly work.

DJabberd Debian HOWTO--在Debian上部署djabberd的howto文档

Get the latest copy
From https://github.com/djabberd/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

Install DJabberd

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

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 freeoa.net>
  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

最新版本:0.8


项目主页:https://github.com/djabberd/