標籤:
廢話少說,Linux下開機自啟動Ejabberd步驟如下:
1、從ejabberd安裝目錄的bin目錄拷貝ejabberd.init到/etc/init.d/ejabberd下
[[email protected] ~]# cp /opt/ejabberd-2.1.13/bin/ejabberd.init /etc/init.d/ejabberd
2、建立使用者ejabberd
[[email protected] init.d]# useradd ejabberd[[email protected] init.d]# passwd ejabberdChanging password for user ejabberd.New password: Retype new password: passwd: all authentication tokens updated successfully.
3、賦予目錄寫入權限 我這裡為了方便直接賦給所有許可權了
[[email protected] init.d]# cd /opt/ejabberd-2.1.13/[[email protected] ejabberd-2.1.13]# cd ..[[email protected] opt]# chmod -R 777 ejabberd-2.1.13/
4、建立啟動的軟串連
[[email protected] opt]# cd /etc/rc5.d[[email protected] rc5.d]# ln -s ../init.d/ejabberd S99ejabberd[[email protected] rc5.d]# cd /etc/rc3.d[[email protected] rc3.d]# ln -s ../init.d/ejabberd S99ejabberd
5、開機重新啟動測試
查看啟動進程:
[[email protected] ~]# ps -ef
程式已經啟動了!!!
ejabberd 1162 1 0 14:49 ? 00:00:00 /opt/ejabberd-2.1.13/bin/epmd -daemonejabberd 1164 1 0 14:49 ? 00:00:03 /opt/ejabberd-2.1.13/bin/beam.smp -K true -P 250000 -- -root /opt/ejabberd 1217 1164 0 14:49 ? 00:00:00 inet_gethost 4ejabberd 1218 1217 0 14:49 ? 00:00:00 inet_gethost 4
Linux下ejabberd開機自啟(CentOS)