现在的位置: 首页 > 综合 > 正文

从源码编译安装sipx4.0(CENTOS 操作系统)

2013年10月19日 ⁄ 综合 ⁄ 共 10648字 ⁄ 字号 评论关闭

 前提: 安装centos5操作系统。

一.关闭防火墙

二.Disable SELinux

File: /etc/selinux/config
SELINUX=disabled

三.安装开发工具

   yum install gcc gcc-c++ autoconf automake libtool subversion doxygen rpm-build zip /
httpd-devel openssl-devel jpackage-utils which unzip /
pcre-devel expat-devel unixODBC-devel createrepo /
jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-net /
ant log4j junit ant-commons-logging ant-junit ant-trax ant-nodeps /
mod_ssl postgresql-server libXp zlib-devel postgresql-devel ruby ruby-devel

yum install libpng-devel libart_lgpl-devel freetype freetype-devel oro scons

 

wget ftp://mirror.switch.ch/pool/1/mirror/epel/5/x86_64/scons-0.98.1-1.el5.noarch.rpm
rpm -i scons-0.98.1-1.el5.noarch.rpm

yum install rpmdevtools redhat-rpm-config

yum install alsa-lib-devel curl-devel gnutls-devel lzo-devel gdbm-devel /
mysql-devel ncurses-devel python-devel perl-devel perl-ExtUtils-Embed termcap

 yum install rubygems rubygem-rake ruby-postgres w3c-libwww-devel cppunit-devel /
   xerces-c-devel
gem install file-tail     # Run this twice if it fails the first time.

 wget -P /etc/yum.repos.d http://sipxecs.sipfoundry.org/temp/sipXecs/sipxecs-unstable-centos.repo
yum install cgicc-devel java-1.6.0-sun-devel ruby-dbi rubygems w3c-libwww-devel cppunit /
    ruby-postgres xerces-c-devel jakarta-commons-net nsis sipx-freeswitch
gem install rake
gem install file-tail

yum install bind

四.配置DHCP和DNS

1.配置域名

File: /etc/hosts
A host that was assigned a fixed IP address:
127.0.0.1               localhost.localdomain localhost
192.168.5.145           sipx.example.com sipx
2.安装DHCP
yum install dhcp
3.配置DHCP服务器
rndc-confgen -a
File: Generated /etc/rndc.key file
 key "rndckey" {
        algorithm hmac-md5;
        secret "JIjUPfT2GZZ172o5IdcK1Q==";#这里的key每个人是不同的
 }; 

File: /etc/dhcpd.conf
 authoritative;              # No other DHCP servers on this subnet
 ddns-update-style interim;  # Supported update method - see man dhcpd.conf
# ddns-update-style ad-hoc;  # Add this instead of "interim" if not using ddns
 ignore client-updates;      # Overwrite client configured FQHNs
 ddns-domainname "domain.com.";
 ddns-rev-domainname "in-addr.arpa.";



 key rndckey {               # Key for DNS updates
    algorithm hmac-md5;
    secret "JIjUPfT2GZZ172o5IdcK1Q=="; # 同上边 /etc/rndc.key中的内容
 };

 zone domain.com. {          # Forward zone to be updated
    primary 127.0.0.1;
    key rndckey;
 }

 zone 5.168.192.in-addr.arpa. { # Backward zone to be updated
    primary 127.0.0.1;
    key rndckey;
 }

subnet 192.168.5.0 netmask 255.255.255.0 {

  range                         192.168.5.200 192.168.5.250;
  default-lease-time            21600;
  max-lease-time                43200;

  option routers                192.168.5.1;   # Default gateway
  option subnet-mask            255.255.255.0;
  option domain-name            "example.com";
  option domain-name-servers    192.168.5.145; # loopback address does not work here

#  option nis-domain            "example.com";

  option time-offset            -18000;        # Eastern Standard Time
  option tftp-server-name       "sipx.example.com";  # required for phones to pickup profiles

  option ntp-servers            192.168.5.145;
# option netbios-name-servers   192.168.5.145;
# option netbios-node-type      8; # try WINS servers first, broadcast if necessary

# Example for resource reservations:
#       host xyz {
#               ddns-hostname "host.example.com";  # use for hosts that do not send a hostname
#               hardware ethernet 12:34:56:78:AB:CD;
#               fixed-address 192.168.5.x;
#       }
}
4.启动DHCP
/sbin/service dhcpd start

五.配置DNS服务器

 

1.文件 /etc/named.conf

The following two sections were added automatically when running the rndc-confgen -a command:

controls {
       inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
include "/etc/rndc.key";

The following options section and two zone definitions were added manually:

options {
       directory "/var/named";
       dump-file "/var/named/data/cache_dump.db";
       statistics-file "/var/named/data/named_stats.txt";
};
zone "example.com" IN {
       type master;
       file "example.com.zone";
       allow-update { key "rndckey"; };
       notify yes;
};
zone "5.168.192.in-addr.arpa" {
       type master;
       file "192.168.5.zone";
       allow-update { key "rndckey"; };
       notify yes;
};

2.文件 /var/named/example.com.zone

;
; Zone file for domain.com
;

$TTL 3D
@       IN      SOA    ns1.example.com. root.example.com. (
                       200602132       ; serial#
                       3600            ; refresh, seconds
                       3600            ; retry, seconds
                       3600            ; expire, seconds
                       3600 )          ; minimum TTL, seconds

                NS     ns1.example.com.   ; Inet Address of nameserver
example.com.     MX     10 mail           ; Primary Mail Exchanger
;
localhost       A      127.0.0.1
sipx            A      192.168.5.145     ; Record of class IN by default

_sip._udp       SRV    100     1       5060    sipx
_sip._tcp       SRV    200     1       5060    sipx
_sips._tcp      SRV    300     1       5060    sipx

ns1             CNAME  sipx
mail            CNAME  sipx
3.文件 /var/named/192.168.5.zone
;
; Reverse zone file for domain.com
;

$TTL 3D
@       IN      SOA    ns1.example.com. root.example.com. (
                       200602132       ; serial#
                       3600            ; refresh, seconds
                       3600            ; retry, seconds
                       3600            ; expire, seconds
                       3600 )          ; minimum TTL, seconds

                NS     ns1.example.com.   ; Inet Address of nameserver
;
1               PTR    localhost.
145             PTR    sipx.example.com.

; Don't specify any reverse pointer records for addresses in the
; DHCP range. Dynamic updates will define those as necessary.

4.改变zone文件的拥有权限

In order for the named server to be able to update the zone files as it receives dynamic update requests from the DHCP server, it has to have write permission for all the zone files. If you created your zone files as root, you have to change permissions as follows:

cd /var/named
chown named:named *
5.赋予 named 对Zone 文件的写权限

If SELinux is disabled (required for sipX), then allow named to write its zone files and create files in its $ROOTDIR/var/named directory; this is necessary for dynamic updates (DDNS) and slave zone transfers.

5.赋予 named 对Zone 文件的写权限

If SELinux is disabled (required for sipX), then allow named to write its zone files and create files in its $ROOTDIR/var/named directory; this is necessary for dynamic updates (DDNS) and slave zone transfers.

File: /etc/sysconfig/named
# This line needs to be added 
 ENABLE_ZONE_WRITE=yes
# This line enables the chroot and was configured automatically when installing the chroot jail
 ROOTDIR=/var/named/chroot  

 

6.文件/etc/resolv.conf

search example.com
nameserver 127.0.0.1
7.启动 DNS Server 
/sbin/service named start

六.建立工作目录

 mkdir WORKING
cd WORKING
七.svn获取源码

   svn co -q http://sipxecs.sipfoundry.org/rep/sipXecs/main/
八.下载编译用的shell脚本,并运行

wget http://sipxecs.sipfoundry.org/rep/sipXecs/main/extras/express_devel/devel_build_install.sh
chmod +x devel_build_install.sh
./devel_build_install.sh

 


九.重新编译源码

make recurse TARGETS="all install"

make build

抱歉!评论已关闭.