0
回答
Jabber服务器Jabberd安装

Jabberd到现在经历了多个版本,是比较稳定的,下面为安装过程

mysql安装
rpm -i MySQL-server-4.0.18-0.i386.rpm
rpm -i MySQL-shared-4.0.18-0.i386.rpm
rpm -i MySQL-client-4.0.18-0.i386.rpm
rpm -i MySQL-devel-4.0.18-0.i386.rpm

libidn安装
tar zxvf libidn-0.5.9.tar.gz
cd libidn-0.5.9
./configure
make
make install

openssl安装
tar -zxvf openssl-0.9.7d.tar.gz
cd openssl-0.9.7d
./config
make
make install

jabberd安装前设置
tar zxvf jabberd-2.0s6.tar.gz
cd jabberd-2.0s6
cd tools
mysql (进入mysql)
mysql> \. db-setup.mysql
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON jabberd2.* TO jabberd2@localhost IDENTIFIED BY 'secret';
mysql> quit

添加组、用户
groupadd jabber
useradd -g jabber jabber

运行以下命令
mkdir -p /usr/local/var/jabberd/db
mkdir -p /usr/local/var/jabberd/log
mkdir -p /usr/local/var/jabberd/pid
chown -R jabber:jabber /usr/local/var/jabberd

安装jabberd
cd ..
./configure --enable-debug --with-extra-include-path=/usr/local/ssl/include --with-extra-library-path=/usr/local/ssl/lib
make
make install

chown jabber:jabber /usr/local/etc/jabberd/*
chmod 660 /usr/local/etc/jabberd/*
ln -s /usr/local/etc/jabberd/ /etc/jabberd

修改/usr/local/etc/jabberd/下的文件
1) c2s.xml
<!-- Local network configuration -->
<id>www.oveal.cn</id>

2) sm.xml
a)
<!-- Session manager configuration -->
<sm>
<id>www.oveal.cn</id>

b) 要做以下修改才能使用从数据库添加的用户
<!--
<auto-create/>
-->
修改为
<auto-create/>

运行
su jabber
/usr/local/bin/jabberd

添加用户
connect jabberd2;
insert into authreg (username, realm, password) values ('tanshaofu', 'www.oveal.cn', '123456');
insert into authreg (username, realm, password) values ('tan', 'www.oveal.cn', '123456');

举报
红薯
发帖于9年前 0回/1K+阅
顶部