为了学习ims,在电脑上装了双系统,xp+ubuntu8.10。下列是open ims core安装过程。
第一步: 解决上网问题和设置软件源
1、动态ip
DHCP方法配置如下(假设通过eth0上网)
# The primary network interface - use DHCP to find our address
auto eth0
iface eth0 inet dhcp //指定为dhcp
然后重启
sudo /etc/init.d/networking restart
2、静态ip
静态IP地址配置如下(假设通过eth1上网)# The primary network interface
auto eth1
iface eth1 inet static //指定为static
address 192.168.3.90 //IP地址
gateway 192.168.3.1 //网关
netmask 255.255.255.0 //子网掩码
同样需要重启
sudo /etc/init.d/networking restart
3、设置软件源
我用的是上海交通大学更新服务器(教育网很快)和随便一个国内的源
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe
国内非教育网源
#cn99.com 源更新服务器(江苏省常州市电信,推荐电信用户使用,我自己是南方电信1M带宽的用户,更新速度平均有100K):
deb http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse
#Mirror.lupaworld.com 源更新服务器(浙江省杭州市双线服务器,网通同电信都可以用,亚洲地区官方更新服务器):
deb http://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse
Ubuntu 官方源 推荐北方网通用户添加
deb http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
台湾的官方源速度也相当不错,有时甚至快于内地的:
deb http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
防止非官方源中软件包不全的问题,请在sources.list文件中尾部添加下面这个官方源。
deb http://archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse
设置软件源的方法:
在终端输入并运行
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份当前的源列表,以便日后需要时恢复)
sudo gedit /etc/apt/sources.list (修改sources.list文件中源的列表)
然后 保存编辑好的文件,执行以下命令更新。
sudo apt-get update #这一步是更新你的源列表,换源后必须执行
(如果更新速度非常慢请更换源)
sudo apt-get dist-upgrade #这一步是更新软件
更新完软件后,再继续设置吧。
有时你可能需要使用:sudo apt-get -f install 修复安装
因为经常会用到终端:所以把终端加到右键菜单:
sudo apt-get install nautilus-open-terminal
这就终端就在右键菜单了可以了
第二步:下载Open IMS Core 到服务器上
· 你将需要subversion软件包:
sudo apt-get install subversion
· 接下来创建一个目录:
sudo mkdir /opt/OpenIMSCore/
· 给目录设置自己使用权 (username替换成你自己的名字):
sudo chown -R username /opt/OpenIMSCore/
· 创建 CSCFs 和 FHoSS目录:
cd /opt/OpenIMSCore
· 从 Berlios的subversion服务器下载最新版本:
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
tip: 如果服务器在防火墙后面不能工作,可以在~/.subversion/servers 检查并设置正确的代理主机和端口。
解压:sudo tar zxvf FHoSS20081023.r0595.tgz.gz
Sudo tar zxvf ser_ims20081021.r0594.tgz.gz
解压后回自动在OpenIMSCore目录下生成FhoSS和ser_ims的文件
第三步:安装需要的软件包
你必须安装下列Ubuntu软件包: sun-java6-jdk, mysql-server 5.0, libmysqlclient15-dev, libxml2-dev, bind, ant, flex和bison。安装这些包可以通过新得丽软件包管理器或者命令行:
sudo apt-get install sun-java6-jdk mysql-server5.0 libmysqlclient15-dev libxml2 libxml2-dev bind9 ant flex bison
译者:安装ims还需要有个前提:要有编译环境(如:gcc make)。如果想利用ipsec安全,还需要安装ipsec-tools,如果想利用TLS,还需要安装openssl-dev。
第四步: DNS配置
· 拷贝open-ims的DNS文件到bind目录:
sudo cp /opt/OpenIMSCore/ser_ims/cfg/open-ims.dnszone /etc/bind/
· 添加下列行到 /etc/bind/named.conf.local文件
zone “open-ims.test” IN {
type master;
file “/etc/bind/open-ims.dnszone”;
};
· 你必须重新bind才能使改变生效:
sudo /etc/init.d/bind9 restart
· 检查所有工作。用ping试试,看能不能获取回应。
ping pcscf.open-ims.test
第五步:装载数据库
MySQL配置 (用户名root/密码在安装MySQL时已设置)
cd /opt/OpenIMSCore
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
第六步:编译
· 到/opt/OpenIMSCore/ser_ims目录编译CSCFs(P-CSCF、I-CSCF、S-CSCF):
sudo make install-libs all
· 在/opt/OpenIMSCore/FHoSS目录下编译FHoSS:
ant compile deploy
Tip: 如果你服务器没有互联网或在防火墙后边,那么你需要下载 http://www.w3.org/2001/xml.xsd 文件,并拷贝它到/opt/OpenIMSCore/FHoSS/xsd/目录
然后在xsd/ZhDataType.xsd文件修改
将:schemaLocation=”http://www.w3.org/2001/xml.xsd”/>
修改成:schemaLocation=”file:///opt/OpenIMSCore/FHoSS/xsd/xml.xsd”/>
第七步:运行
· 拷贝配置文件到他它们的OpenIMSCore文件夹中
cp /opt/OpenIMSCore/ser_ims/cfg/* /opt/OpenIMSCore/
· 在每一个新的终端运行CSCFs (CTRL+SHIFT+T):
./pcscf.sh
./icscf.sh
./scscf.sh
· 在它自己tab运行 FHoSS (如果在这里发生错误,请尝试设置 JAVA_HOME环境变更后再试一下):
cd FHoSS/deploy/
./startup
更改JAVA_HOME环境变量:
将FHoSS/deploy/startup.sh中的JAVA_HOME改为绝对路径/usr/lib/jvm/java-6-sun/bin/java -cp $CLASSPATH de.fhg.fokus.hss.main.HSSContainer $1 $2 $3 $4 $5 $6 $7 $8 $9
第八步:登陆测试
http://localhost:8080
用户名、密码为:hss
第九步: UCT测试
· 下载一个IMS客户端并安装它。这里有一个支持Ubuntu的IMS客户端(UTC IMS Client)的软件包:
http://uctimsclient.berlios.de/
· 下载UCT IMS Client deb文件并安装:
sudo dpkg -i uctimsclient1.0.x.deb
在IMS参数设置P-CSCF和realm. 默认的pcscf参数设置是sip:pcscf.open-ims.test 和默认的realm参数设置是open-ims.test.点击“Register as Alice”。打开另一个客户端,并点击“Register as Bob”。在public地址栏点击“call”尝试让两个客户端建立一个通话。(Try and place a call between the two clients by typing in the public URI in the address bar and click “Call”.)