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

 前提: 安装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

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值