jabberd2 安装配置
来源:互联网 发布:qq宠物挂机软件 编辑:程序博客网 时间:2024/05/21 07:07
1、准备安装包:
cyrus-sasl-2.1.23.tar.gz
jabberd-2.2.11.tar.bz2
libidn-1.19.tar.gz
openssl-1.0.0a.tar.gz
expat-2.0.1.tar.gz
libgcrypt-1.4.6.tar.bz2
mysql-5.0.91-linux-i686-glibc23.tar.gz(已装,忽略)
udns_0.0.9.tar.gz
zlib-1.2.5.tar.gz
libgsasl-1.4.4.tar.gz
2、 设置jabber服务器运行用户,以及相应的目录
参考 http://jabberd2.xiaoka.com/wiki/InstallGuide/QuickStartGuide A.1.4, A.1.5
groupadd jabber
useradd -g jabber
export JABBER_HOME=/usr/local/easyjabberd
mkdir -p "$JABBER_HOME/var/jabberd/db"
mkdir -p "$JABBER_HOME/var/jabberd/log"
mkdir -p "$JABBER_HOME/var/jabberd/pid"
chown -R jabber:jabber "$JABBER_HOME/var/jabberd"
mkdir -p /usr/local/easyjabberd/app
3、 安装expat,用作XML解析
(1), tar zxvf expat-2.0.1.tar.gz
(2), ./configure --prefix=/usr/local/easyjabberd/app/expat
(3), make
(4), make install
4、安装libidn
(1), tar zxvf libidn-1.19.tar.gz
(2), ./configure --prefix=/usr/local/easyjabberd/app/libidn
(3), make
(4), make install
5、安装udns
udns的configure没有提供--prefix,所以我们编译后,手动拷贝所需要的文件到/usr/local/easyjabberd/app/目录下
(3), ./configure
(4), make
(5), cp udns.h /usr/local/easyjabberd/app/include/
(6), cp libudns.a /usr/local/easyjabberd/app/lib/
6、安装openssl
(1), tar zxvf openssl-1.0.0a.tar.gz
(2), cd openssl-1.0.0a
(3), ./config --prefix=/usr/local/easyjabberd/app/
(4), make
(4), make install
7、 安装Cyrus sasl
(1), tar zxvf cyrus-sasl-2.1.23.tar.gz
(2), cd cyrus-sasl-2.1.23
(3), ./configure --prefix=/usr/local/easyjabberd/app/ --with-openssl=/usr/local/easyjabberd/app/ CPPFLAGS="-I/usr/local/easyjabberd/app/include/ -I/usr/local/easyjabberd
/app/include/openssl" LDFLAGS="-L/usr/local/easyjabberd/app/lib"
(4), make
(5), make install
8、 安装zlib
(1), tar zxvf zlib-1.2.5.tar.gz
(2), cd zlib-1.2.5
(3), ./configure --prefix=/usr/local/easyjabberd/app/
(4), make
(5), make install
9、 安装Jabberd2
(1), tar jxvf jabberd-2.2.11.tar.bz2
(2), cd jabberd-2.2.11
(3), ./configure --prefix=/usr/local/easyjabberd/jabberd2 --enable-mysql=/usr/local/easyjabberd/mysql/ CFLAGS="-I/usr/local/easyjabberd/app/include -I/usr/local/easyjabberd/app/include/openssl" LDFLAGS="-L/usr/local/easyjabberd/app/lib -Wl,-R/usr/local/easyjabberd/app/lib" --with-extra-include-path=/usr/local/easyjabberd/app/include --with-extra-library-path=/usr/local/easyjabberd/app/lib --with-sasl=cyrus --enable-mio=epoll
(4), make
(5), 调试报错,sx/sasl_cyrus.c 23行注释掉
(6), make
(7), make install
10、 设置MySQL数据库
参考:http://man.chinaunix.net/linux/debian/debian_learning/ch09s11.html
注:db-setup.mysql在解压包的 tool目录下
mysql --user=xxxx --password=xxxx < db-setup.mysql > output.log
mysql --user=xxxx --password=xxxx -e "grant select,insert,delete,update on jabberd2.* to jabberd2@localhost identified by '123456' "
11、 设置JID
参考:http://man.chinaunix.net/linux/debian/debian_learning/ch09s11.html
改动sm.xml,找到
<!-- Session manager configuration --><sm> <!-- Our ID on the network. Users will have this as the domain part of their JID. If you want your server to be accessible from other Jabber servers, this ID must be resolvable by DNS.s (default: localhost) --> <id>localhost</id>把localhost改成你的服务器的真实服务器名,须要为FQDN
改动c2s.xml,找到
<!-- Local network configuration --> <local> <!-- Who we identify ourselves as. This should correspond to the ID (host) that the session manager thinks it is. You can specify more than one to support virtual hosts, as long as you have additional session manager instances on the network to handle those hosts. The realm attribute specifies the auth/reg or SASL authentication realm for the host. If the attribute is not specified, the realm will be selected by the SASL mechanism, or will be the same as the ID itself. Be aware that users are assigned to a realm, not a host, so two hosts in the same realm will have the same users. If no realm is specified, it will be set to be the same as the ID. --> <id>localhost</id>把localhost改成你的服务器的真实服务器名,须要为FQDN
12、 设置数据库访问用户名和密码
改动sm.xml和c2s.xml,找到mysql的配置项改掉就行了
13、 启动
./jabberd -b
如果想要输出调试信息,可以用下面的参数启动:
./jabberd -D
个人总结:mysql没有配置成功,于是手动改动配置文件里边的数据库选项。日志默认在systemlog里边,也需要手工改动,改成file格式。所有步骤都完成后,下载了个潘迪安测试(需要设置下下c2s的ip,port)。没有账号,开始注册。提示连接失败。查看c2s的日志,发现漏了第11步增加jid。修改完配置后,重新启动服务。可以注册成功了。
- jabberd2 安装配置
- Jabberd2安装
- Jabberd2:安装和管理指南
- linux 安装jabberd2服务器全过程
- Jabberd2.0 Linux安装步骤及注意
- LinuxMint 17 安装 jabberd2 服务器与web客户端
- Jabberd2 MySQL数据库结构
- Jabberd2源代码分析: JID
- jabberd2 系统架构
- Jabberd2源代码分析:pool
- Jabberd2源代码分析:spool
- Jabberd2源代码分析: SX
- Jabberd2源代码分析: MIO
- 搭建jabberd2服务器
- linux jabberd2笔记
- jabberd2 服务器启动脚本
- jabberd2消息流
- 使用vc编译jabberd2服务器
- 各种数据类型存储最大值
- java代码执行耗时统计方法
- 第76题 Min Stack
- Android滑动菜单特效实现,仿人人客户端侧滑效果,史上最简单的侧滑实现
- POJ - 3258 River Hopscotch 二分
- jabberd2 安装配置
- HTML里面的tr、td、th标签
- java回收机制详解
- c#4.0中的命名参数
- android 唤醒屏幕并解锁
- Maven环境搭建和介绍
- nltk词干提取
- Class a=new Class(){a=b,c=d}。C#语言什么意思 主要是实例化后怎么有大括号从来没这么用过。
- 操作电动升降机的要点知识