<!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} h1 {mso-style-next:正文; margin-top:17.0pt; margin-right:0cm; margin-bottom:16.5pt; margin-left:0cm; text-align:justify; text-justify:inter-ideograph; line-height:240%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:1; font-size:22.0pt; font-family:"Times New Roman"; mso-font-kerning:22.0pt;} h2 {mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; mso-outline-level:2; font-size:18.0pt; font-family:宋体; mso-bidi-font-family:宋体;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:510604404; mso-list-type:hybrid; mso-list-template-ids:-1096244404 1517825742 67698689 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 {mso-level-number-format:japanese-counting; mso-level-text:%1、; mso-level-tab-stop:36.0pt; mso-level-number-position:left; text-indent:-36.0pt;} @list l0:level2 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:42.0pt; mso-level-number-position:left; margin-left:42.0pt; text-indent:-21.0pt; font-family:Wingdings;} @list l1 {mso-list-id:1736321566; mso-list-type:hybrid; mso-list-template-ids:-6421562 67698699 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l1:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:21.0pt; mso-level-number-position:left; margin-left:21.0pt; text-indent:-21.0pt; font-family:Wingdings;} @list l2 {mso-list-id:1739588991; mso-list-type:hybrid; mso-list-template-ids:-66017338 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l2:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:21.0pt; mso-level-number-position:left; margin-left:21.0pt; text-indent:-21.0pt; font-family:Wingdings;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->
OpenIMSCore 安装
Version 1.0
2009-12-21
本文基于 OpenIMSCore 文档及在 CentOS5.2 上的实际尝试过程编写。
一、 前置条件
需要的软件:
l GCC3/4, make, JDK1.5, ant
l MySQL installed and started (or other DBMS if you can deal with it)
l bison, flex
l libxml2 (> 2.6), libmysql - both with development
l Linux kernel 2.6 and ipsec-tools (setkey) if you want to use IPSec security
l Optional: openssl if you would like to enable the TLS security
l bind installed and running (or other name server if you can deal with it)
l Java sdk 1.5 or later.
二、 获得源码
Ø 创建并进入目录: /opt/OpenIMSCore
Ø svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/trunk ser_ims
Ø svn checkout http://svn.berlios.de/svnroot/repos/openimscore/FHoSS/trunk FHoSS
Ø 其他可获得 CDiameterPeer/JavaDiameterPeer/website 的代码,但它们在下述安装过程中没有用到;
注意:
Ø 使用 TortoiseSVN 在 Windows 上下载的代码编译会失败,原因是 TortoiseSVN 不支持 SVN 的文件“ link ”特性—— OpenIMSCore 某些代码文档使用类似“ link ../scscf/ims_pm.c ”实现对其他文件的引用;
三、 编译
Ø 进入 ser_ims 目录, make install-libs all ;
Ø 进入 FHoSS 目录,执行 ant compile 和 ant deploy ;
注意:
Ø 执行 ant compile 报错: Unable to locate tools.jar ,发现 JAVA_HOME 指向 jre 而非 jdk ,更改后成功: JAVA_HOME=/usr/jre1.5.0_12
四、 配置Bind
在 CentOS5.2 上碰到 Bind 的问题, yum install bind 安装后没有文件 /ect/named.conf ,手工建了一个后问题解决,文件内容如下:
[root@centos ~]# cat /etc/named.conf
options {
# directory "/var/lib/named";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
# The forwarders record contains a list of servers to which queries
# should be forwarded. Up to three servers may be listed.
forwarders { 10.130.1.1 ; 10.130.1.9; };
# Enable the next entry to prefer usage of the name server declared in
# the forwarders section.
forward first;
listen-on-v6 { any; };
# If notify is set to yes (default), notify messages are sent to other
# name servers when the zone data is changed. Instead of setting
# a global 'notify' statement in the 'options' section, a separate
# 'notify' can be added to each zone definition.
notify no;
};
# This is where you put in the link to the zone you
# want to serve
zone "open-ims.test" in {
type master;
file "/var/bind/pri/open-ims.dnszone";
};
# Include the meta include file generated by createNamedConfInclude. This
# includes all files as configured in NAMED_CONF_INCLUDE_FILES from
# /etc/sysconfig/named
#include "/etc/named.conf.include";
之后执行下述操作:
Ø 复制 /opt/OpenIMSCore/ser_ims/cfg/open-ims.dnszone 到 /var/bind/pri/open-ims.dnszone ;
Ø chown -R named:named /var/bind/pri/open-ims.dnszone
Ø 将 /var/bind/pri/open-ims.dnszone 中的 127.0.0.1 全部改成本机地址 10.130.16.141
Ø 重启 bind 服务: service named restart
Ø 尝试执行命令, dig @127.0.0.1 pcscf.open-ims.test ,检查是否成功
Ø 更改 /etc/resolv.conf ,内容如下:
[root@centos OpenIMSCore]# cat /etc/resolv.conf
nameserver 127.0.0.1
search open-ims.test
domain open-ims.test
nameserver 10.130.1.1
nameserver 10.130.1.9
Bind 配置成功后,设置客户机 DNS 指向服务器所在的地址,如 10.130.16.141 ,则在客户机上应能 ping 通地址 open-ims.test ;
五、 设置Mysql
执行下述命令:
Ø mysql -u root -p -h localhost < ser_ims/cfg/icscf.sql
Ø mysql -u root -p -h localhost < FHoSS/scripts/hss_db.sql
Ø mysql -u root -p -h localhost < FHoSS/scripts/userdata.sql
六、 设置及运行
将所有配置 copy 到 /opt/OpenIMSCore :
Ø cp ser_ims/cfg/*.cfg
Ø cp ser_ims/cfg/*.xml
Ø cp ser_ims/cfg/*.sh
目前 OpenIMSCore 的配置只监听了 loopback device ,执行脚本 configurator.sh 进行更改;
更改完成后启动服务:
Ø 执行 pcscf.sh, icscf.sh 及 scscf.sh ;
Ø 执行 FHoSS/deploy/startup.sh ,如果失败则检查 JAVA_HOME 是否指向了 jdk ,或进入目录 FHoSS/deploy 执行 startup.sh ;检查 http://localhost:8080/ 是否可以正常访问——必须是 localhost ,目前不能远程访问; web 的登录为 hssAdmin/hss 。
七、 测试
下载了一个 IMS client 进行测试, MONSTER ( http://imscommunicator.berlios.de/ )是一个与 OpenIMSCore 配套的客户端,使用起来很方便; Alice 成功呼叫 Bob 。
尝试使用 Kapanga Softphone ,未成功!
八、 参考文献
[1] OpenIMSCore Installation Guide, http://www.openimscore.org/installation_guide
[2] http://www.openimscore.org