分类: LINUX
2009-06-09 15:25:02
apt-get install sun-java6-jdk mysql-server libmysqlclient15-dev libxml2-dev bind9 ant flex bison
mkdir /opt/OpenIMSCore cd /opt/OpenIMSCore mkdir ser_ims svn checkout ser_ims mkdir FHoSS svn checkout FHoSS
编译之前设置JAVA环境变量
export JAVA_HOME=/usr/lib/jvm/java-6-sun export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar::$JAVA_HOME/lib export PATH=$JAVA_HOME/bin:$PATH
编译
cd ser_ims make install-libs all cd .. cd FHoSS ant compile ant deploy cd ..
配置domain和IP
cd ser_ims/cfg/ ./ser_ims/cfg/
在弹出的选项中设置domain和IP,默认是open-ims.test和127.0.0.1.
注意:如果SIP client不是和server在同一台机上,这里IP改成自己的IP,我这里是192.168.1.5
DNS配置
sudo cp /etc/resolv.conf /etc/resolvBAK.conf sudo vim /etc/resolv.conf nameserver 127.0.0.1 (IP 地址也可以根据本机地址确定) search open-ims.test domain open-ims.test
sudo cp /opt/OpenIMSCore/ser_ims/cfg/open-ims.dnszone /etc/bind/
在/etc/bind/named.conf中添加
zone "open-ims.test" { type master; file "/etc/bind/open-ims.dnszone"; };
open-ims.dnszone默认的IP是127.0.0.1, 将127.0.0.1改成本机IP,我这里是192.168.1.5
重启bind生效:
sudo /etc/init.d/bind9 restart
测试域名解析是否成功:
ping pcscf.open-ims.test
设置数据库
mysql -uroot -p < /opt/OpenIMSCore/ser_ims/cfg/icscf.sql mysql -uroot -p < /opt/OpenIMSCore/FHoSS/scripts/hss_db.sql mysql -uroot -p < /opt/OpenIMSCore/FHoSS/scripts/userdata.sql
要求输入密码时输入MySQL的root密码。
配置 IMS Core
cp ser_ims/cfg/*.cfg . cp ser_ims/cfg/*.xml . cp ser_ims/cfg/*.sh .
更改认证方式(MD5)
sudo vim /opt/OpenIMSCore/scscf.cfg
comment:
#modparam("scscf","registration_default_algorithm","AKAv1-MD5")
uncomment:
modparam("scscf","registration_default_algorithm","MD5")
启动OpenIMSCore
分别在终端运行:
cd /opt/OpenIMSCore/ ./pcscf.sh ./icscf.sh ./scscf.sh
启动FHoSS,如果有错误,可能是JAVA_HOME设置有误:
./startup
登录测试
用户名、密码为:hss
这里我用的客户端是eyeBeam1.5
添加两个测试用户
cd /opt/OpenIMSCore ./add-imscore-user_newdb.sh -u 1001 -p 1001 –a ./add-imscore-user_newdb.sh -u 1002 -p 1002 –a
将测试机的DNS设成IMS core server的IP。添加如下设置:
测试机A: 显示名:1001 用户名:1001 口令: 1001 鉴权用户名: 1001@open-ims.test 域名: open-ims.test 代理: DNS-IP:4060
测试机B:
类似A