Linux下ejabberd安装配置
1、下载Ejabberd安装包
wget http://www.process-one.net/downloads/ejabberd/2.1.13/ejabberd-2.1.13-linux-x86_64-installer.run
2、下载完成后,给安装包加权限,否则无法安装
[root@localhost xmpp]# chmod +x ejabberd-2.1.13-linux-x86_64-installer.run
3、安装Ejabberd
[root@localhost xmpp]# ./ejabberd-2.1.13-linux-x86_64-installer.run Language Selection Please select the installation language [1] Dutch - Nederlands [2] English - English [3] French - Français [4] German - Deutsch [5] Russian - Русский [6] Simplified Chinese - 简体中文 [7] Spanish - Español .....
几个注意的地方:a、设置域的时候输入本机的IP地址 b、语言最好选择英语
4、安装完成后启动
[root@localhost xmpp]# cd /opt [root@localhost opt]# cd ejabberd-2.1.13/ [root@localhost ejabberd-2.1.13]# cd bin [root@localhost bin]# ./start [root@localhost bin]# ./status The node ejabberd@localhost is started with status: started ejabberd 2.1.13 is running in that node
服务已经启动。可以用WEB来管理。
WEB地址:http://ip地址:5280/admin
5、Mysql配置
[root@localhost bin]# mysql -u root -p Enter password: 创建用户和修改权限 mysql:>create database ejabberd mysql:>grant all privileges on ejabberd.* to ejabberd@’127.0.0.1′ IDENTIFIED BY ’ejabberd’; mysql:>grant all privileges on ejabberd.* to ejabberd@’localhost’ IDENTIFIED BY ’ejabberd’; 创建数据库 mysql:>source /usr/local/ejabberd/lib/ejabberd-2.1.3/priv/odbc/mysql.sql;
6、XMPP服务配置
修改ejabberd.cfg文件如下: 注释掉: {auth_method, internal}. 取消注释:{auth_method, odbc}. 取消注释并设置数据库名称和密码: {odbc_server, {mysql, "localhost", "ejabberd", "ejabberd", "ejabberd"}}. 修改模块如下:都增加_odbc {mod_last_odbc, []}, {mod_offline_odbc, []}, {mod_privacy_odbc, []}, {mod_private_odbc, []}, {mod_pubsub_odbc, [ % requires mod_caps ... {mod_roster_odbc, []}, {mod_vcard_odbc, []},
重启服务:
cd /bin下
./start 命令
7、注册管理员用户
./ejabberdctl register admin 192.168.200.239 123456