1、下载源码包
两种方法获取源码:
- ejabberd发布版在网站ProcessOne
地址:https://www.process-one.net/en/ejabberd/downloads
- 获取最新的源码在github上
git clone git://github.com/processone/ejabberd.git ejabberd
cd ejabberd
./autogen.sh
2、编译ejabberd需要的依赖包
- GNU Make
- GCC
- Libexpat 1.95 or higher
- Libyaml 0.1.4 or higher
- Erlang/OTP 17.1 or higher
- OpenSSL 1.0.0 or higher, for STARTTLS, SASL and SSL encryption.
- Zlib 1.2.3 or higher, for Stream Compression support (XEP-0138). Optional.
- PAM library. Optional. For Pluggable Authentication Modules (PAM). See section pam.
- GNU Iconv 1.8 or higher, for the IRC Transport (mod_irc). Optional. Not needed on systems with GNU Libc. See section mod_irc.
- ImageMagick’s Convert program. Optional. For CAPTCHA challenges. See section captcha.
3、安装依赖包
- 安装Libexpat
yum install expat-devel
- 安装Libyaml
下载:https://pkgs.org/centos-6/centos-x86_64/libyaml-0.1.3-4.el6_6.x86_64.rpm/download/
rpm -i libyaml-0.1.3-4.el6_6.x86_64.rpm(或者 yum install libyaml-devel)
ejabberdctl live启动正常
rpm -i libyaml-0.1.3-4.el6_6.x86_64.rpm(或者 yum install libyaml-devel)
ejabberdctl live启动正常
- 其他依赖包安装略
4、安装ejabberd
- ./configure --enable-mysql
- make
- make install
5、安装成功后创建的目录如下
- /etc/ejabberd/: 配置文件路径
ejabberdctl.cfg: Configuration file of the administration script
inetrc: Network DNS configuration file for Erlang
- /lib/ejabberd/:
include/: Erlang header files (*.hrl)
priv/: Additional files required at runtime
bin/: Executable programs
lib/: Binary system libraries (*.so)
msgs/: Translation files (*.msgs)
- /sbin/ejabberdctl: 管理脚本
- /share/doc/ejabberd/: ejabberd文档
- /var/lib/ejabberd/: Spool directory:
acl.DCD, ...: Mnesia database spool files (*.DCD, *.DCL, *.DAT)
- /var/log/ejabberd/: Log 目录
erlang.log: Erlang/OTP system log