执行下面命令,指定管理员账号的密码:
grant select,insert,delete,update on * to ‘root‘@‘%‘ identified by ‘123456‘;
grant select,insert,delete,update on * to ‘root‘@‘localhost‘ identified by ‘123456‘;
该命令运行任何客户端连接该服务器。
关闭mysql服务器的方法:mysqladmin -u root -p shutdown
3、安装expat
cd expat-2.1.0/
mkdir debug
cd debug
../configure --prefix=/opt/wacos/server/xmpp/app
make
make install
cd ../..
4、安装libidn
cd libidn-1.30/
mkdir debug
cd debug
../configure --prefix=/opt/wacos/server/xmpp/app
make
make install
cd ../..
5、安装udns
cd udns-0.4/
../configure
make
cp udns.h /opt/wacos/server/xmpp/app/include
cp libudns.a /opt/wacos/server/xmpp/app/lib
cd ../
6、安装openssl
cd openssl-1.0.2a/
./config -fPIC --prefix=/opt/wacos/server/xmpp/app no-gost no-shared no-zlib
make depend
make install
cd ../
7、安装cyrus
cd cyrus-sasl-2.1.26/
mkdir debug
cd debug
这里需要先做一下修改
vim ../plugins/digestmd5.c
62行#ifdef WITH_SSL_DES 注释掉
还有80行与之对应的#endid
vim ../saslauthd/auth_getpwent.c
57行:把# include <des.h>改成# include <openssl/des.h>
然后在配置、安装
../configure --prefix=/opt/wacos/server/xmpp/app --with-openssl=/opt/wacos/server/xmpp/app CPPFLAGS="-I/opt/wacos/server/xmpp/app/include" LDFLAGS="-L/opt/wacos/server/xmpp/app/lib"
cd ../
8、安装zlib
cd zlib-1.2.8/
./configure --prefix=/opt/wacos/server/xmpp/app
make
make install
cd ../
9、安装libgsasl
cd libgsasl-1.8.0
mkdir debug
cd debug
../configure --prefix=/opt/wacos/server/xmpp/app
make
make install
cd ../../
10、安装jabberd
cd jabberd-2.3.2/
./configure --prefix=/opt/wacos/server/xmpp/jabberd2 \
--enable-debug --enable-pgsql --enable-ssl --enable-mio=epoll --enable-mysql=/usr/bin/ \
CFLAGS="-DDEBUG -I/opt/wacos/server/xmpp/app/include -I/opt/wacos/server/xmpp/app/include/openssl -I/opt/wacos/server/xmpp/app/include/sasl" \
LDFLAGS="-L/opt/wacos/server/xmpp/app/lib -Wl,-R/opt/wacos/server/xmpp/app/lib" \
--with-extra-include-path=/opt/wacos/server/xmpp/app/include:/usr/local/include/mysql \
--with-extra-library-path=/opt/wacos/server/xmpp/app/lib:/usr/local/lib/mysql
make
make install
2、设置jabberd数据库的管理员账号
grant select,insert,delete,update on jabberd2.* to ‘jabberd2‘@‘%‘ identified by ‘123456‘;
grant select,insert,delete,update on jabberd2.* to ‘jabberd2‘@‘localhost‘ identified by ‘123456‘;