首页 > 代码库 > centOS下安装ejabberd
centOS下安装ejabberd
#centos
(安装依赖项)
sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl openssl-devel unixODBC unixODBC-devel ncurses ncurses-devel wxGTK wxGTK-devel fop libyaml libyaml-devel expat expat-devel pam-devel sqlite-devel xsltproc
安装jdk
wget -O ./jdk-8-linux-x64.rpm --no-cookies \
--no-check-certificate --header \
"Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-x64.rpm";\
rpm -ivh ./jdk-8-linux-x64.rpm
压缩图片ImageMagick
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-7.0.3
./configure
make
sudo make install
sudo ldconfig /usr/local/lib
然后最后编译安装ejabberd
#编译安装
./autogen.sh
./configure --enable-all --prefix=/opt/ejabberd
make
make install
#安装服务并设置开机自启动
cp ejabberd.init /etc/init.d/ejabberd
#ubuntu
sudo systemctl enable ejabberd
#centos
sudo chkconfig --add ejabberdchkconfig --level 345 ejabberd on
#启动服务
sudo service ejabberd start
#查看服务状态
service ejabberd status
官网文档:
https://docs.ejabberd.im/admin/installation/
centOS下安装ejabberd