FreeSWITCH中文网,电话机器人开发网 ,微信订阅号:

FreeSWITCH及VOIP,Openser,电话机器人等产品中文技术资讯、交流、沟通、培训、咨询、服务一体化网络。QQ群:293697898

centos 6 上安装配置 FreeSWITCH1.2.stable


tags:FreeSWITCH install centos 创建时间:2015-09-18 12:18:33

QQ群: 293697898 FreeSWITCH+Kamailio+OpenSIPS

epel repo

yum -y install wget 
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

#32 bit 
# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

#http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

#
#今天在测试环境使用yum安装,遇到一个问题:
#Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
#处理很简单,修改文件“/etc/yum.repos.d/epel.repo”, 将baseurl的注释取消, mirrorlist注释掉。即可。
debian:
 apt-get install autoconf automake devscripts gawk g++ git-core libjpeg-dev \
     libncurses5-dev libtool make python-dev gawk pkg-config libtiff5-dev \
     libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev \
     libpcre3-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev

centos:

yum clean all 
yum makecache

yum install -y git subversion autoconf automake libtool gcc-c++ ncurses-devel make

yum -y install expat-devel openssl-devel libtiff-devel libX11-devel unixODBC-devel libssl-devel python-devel 
yum -y install zlib-devel libzrtpcpp-devel alsa-lib-devel libogg-devel libvorbis-devel perl-libs gdbm-devel 
yum -y install libdb-devel uuid-devel @development-tools  patch

yum -y install ldns-devel libidn-devel unbound-devel
yum -y install libjpeg-devel sqlite-devel libcurl-devel
yum -y install pcre-devel libuuid-devel bison-devel bison
yum -y install speex-devel libtheora-devel yasm nasm libedit-devel libicu


cd /usr/local/src 
# To build from Master, the latest source code: 
#git clone https://freeswitch.org/stash/scm/fs/freeswitch.git
##建议使用我们的镜像
#git clone -b v1.4 https://git.oschina.net/nwaycn/freeswitch.git

##### OR ##### 
# To build from the current release source code: 
#我们的镜像
git clone -b v1.2.stable https://git.oschina.net/nwaycn/freeswitch.git
或原git
git clone -b v1.2.stable https://freeswitch.org/stash/scm/fs/freeswitch.git

cd /usr/local/src/freeswitch

# The -j argument spawns multiple threads to speed the build process 
./bootstrap.sh -j

# if you want to add or remove modules from the build, edit modules.conf 
#vi modules.conf 
# add a module by removing '#' comment character at the beginning of the line 
# remove a module by inserting the '#' comment character at the beginning of the line containing the name of the module to be skipped

#使用postgresql时,应指定以下一些
#./configure --enable-core-pgsql-support --host=i686    #host后边的值为uname -m

./configure -C

make && make install 
make all install cd-sounds-install cd-moh-install 
make sounds-install moh-install 
make moh-install 
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/ 
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/ 
#安装服务 
cp build/freeswitch.init.redhat /etc/init.d/freeswitch 
chmod 755 /etc/init.d/freeswitch 
vim /etc/init.d/freeswitch

# 
PROG_NAME=freeswitch 
PID_FILE=${PID_FILE-/var/run/freeswitch/freeswitch.pid} 
#FS_USER=${FS_USER-freeswitch} 
FS_USER=${FS_USER-root} 
FS_FILE=${FS_FILE-/usr/local/freeswitch/bin/freeswitch} 
FS_HOME=${FS_HOME-/usr/local/freeswitch} 
LOCK_FILE=/var/lock/subsys/freeswitch 
FREESWITCH_ARGS="-nc" 
RETVAL=0 
#保存 
mkdir /var/run/freeswitch 
chkconfig --add freeswitch


#作为对外环境的端口,需要改掉5060,5061,5080,5081 
#对应为 7060,7061,7080,7081


上海老李,QQ:1354608370,FreeSWITCH QQ群: