OS環境:
CentOS release 6.5 (Final)
1.安裝
$ sudo yum install epel-release vim -y $ wget http://files.freeswitch.org/freeswitch-releases/freeswitch-1.6.20.tar.bz2 $ tar xvjf freeswitch-1.6.20.tar.bz2
2.安裝依賴包
$ sudo yum install gcc-c++ sqlite-devel zlib-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel openssl-devel -y $ sudo yum install libjpeg-devel lua-devel libsndfile-devel libyuv-devel git libtool -y
3.安裝代碼依賴包
$ cd freeswitch-1.6.20
------1)安裝libyuv(先查看是否存在目錄,存在跳過本步驟)
$ cd libs/ $ git clone https://freeswitch.org/stash/scm/sd/libyuv.git $ cd libyuv/ $ make -f linux.mk CXXFLAGS="-fPIC -O2 -fomit-frame-pointer -Iinclude/" $ sudo make install $ sudo cp /usr/lib/pkgconfig/libyuv.pc /usr/lib64/pkgconfig/
------2)安裝libvpx(先查看是否存在目錄,存在跳過本步驟)
$ cd .. $ git clone https://freeswitch.org/stash/scm/sd/libvpx.git $ cd libvpx/ $ sudo yum install yasm -y $ ./configure --enable-pic --disable-static --enable-shared $ make $ sudo make install $ sudo cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/
------3)安裝opus
$ cd .. $ git clone https://freeswitch.org/stash/scm/sd/opus.git $ cd opus/ $ ./autogen.sh $ ./configure $ make $ sudo make install $ sudo cp /usr/local/lib/pkgconfig/opus.pc /usr/lib64/pkgconfig
-------4)安裝libpng
$ cd .. $ git clone https://freeswitch.org/stash/scm/sd/libpng.git $ cd libpng/ $ ./configure $ make $ sudo make install $ sudo cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/
4.編譯
$ cd freeswitch-1.6.20 $ ./configure $ make $ sudo make install
注:make的時候出現"Neither yasm nor nasm have been found. See the prerequisites section in the README for more info." 報錯的話直接 "yum install yasm"即可
5.安裝聲音文件
$ sudo make cd-sounds-install $ sudo make cd-moh-install
6.設置鏈接符號,便於使用
$ sudo ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/ $ sudo ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/
7.禁用freeswitch上ipv6
cd /usr/local/freeswitch/conf/sip_profiles mv external-ipv6.xml external-ipv6.xml.inactive
mv internal-ipv6.xml internal-ipv6.xml.inactive
mv external-ipv6 external-ipv6.inactive
8.啟動
/usr/local/freeswitch/bin/freeswitch
9.停止
shutdown freeswitch -stop //當運行在后台可以在linux 下使用該命令結束
至此freeswitch-1.6.2版本在centos 6.5上安裝完成,可注冊分機撥打測試
后面將記錄freeswitch配置操作信息