title - ejabberd-2.1.6源码安装与配置(Ubuntu 10.10) 参考资料 [1].http://www.process-one.net/docs/ejabberd/guide_en.html 1.Erlang Development $sudo apt-get install erlang-dev $sudo apt-get install erlang-asn1 $sudo apt-get install erlang-parsetools $sudo apt-get install erlang-nox 2.Requirements 2.1.Generals $sudo apt-get install libexpat-dev $sudo apt-get install libssl-dev $sudo apt-get install libz-dev 2.2. mysql module(optional) ~/opensource/ejabberd-modules/$svn checkout http://svn.process-one.net/ejabberd-modules/mysql/trunk/ mysql ~/opensource/ejabberd-modules/$cd mysql ~/opensource/ejabberd-modules/mysql$./build.sh ******************************************************* after build and install ejabberd(section 3) ******************************************************* ~/opensource/ejabberd-modules/mysql$ sudo cp ebin/*.beam /lib/ejabberd/ebin/ 2.3. exmpp module(optional) $wget http://download.process-one.net/exmpp/exmpp-0.9.5.tar.gz $tar xzvf exmpp-0.9.5.tar.gz ~/opensource/ejabberd-modules/exmpp-0.9.5$./configure ~/opensource/ejabberd-modules/exmpp-0.9.5$make ~/opensource/ejabberd-modules/exmpp-0.9.5$sudo make install (The bellow maybe important information i think) ***************************************************************** Libraries have been installed in: /usr/lib/erlang/lib/exmpp-0.9.5/priv/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. **************************************************************** 3.Get and build ejabberd 3.1.download source git clone git://git.process-one.net/ejabberd/mainline.git ejabberd http://www.process-one.net/en/ejabberd/downloads 3.2.build ~/opensource/ejabberd-2.1.6/src$ ./configure --enable-odbc --enable-user=zhoubo ~/opensource/ejabberd-2.1.6/src$make ~/opensource/ejabberd-2.1.6/src$sudo make install 4.Configuration and Run 4.1.Modify /etc/ejabberd/ejabberd.ctg /etc/ejabberd# diff ejabberd.cfg ejabberd.cfg-backup 91c91 < {hosts, ["u.bzhou.com"]}. --- > {hosts, ["localhost"]}. 363d362 < {acl, admin, {user, "zhoubo", "u.bzhou.com"}}. 4.2.regiser web admin user $ejabberdctl start $ejabberdctl register zhoubo u.bzhou.com password 4.3.logon web admin http://u.bzhou.com:5280/admin/ 通过web admin注册几个帐号,找个xmpp客户端登录就可以了 5.FAQ 5.1.无法启动 可能是系统中曾经安装过ejabberd导致的,删除下面文件夹: $sudo rm /etc/ejabberd/ $sudo rm /var/lib/ejabberd/ $sudo rm /lib/ejabberd/ $sudo rm /var/log/ejabberd/