freeSwitch安裝步驟 for CentOS

1. 下載:
下載地址:http://files.freeswitch.org/
或者直接用git安裝。可能會失敗
git clone -b v1.2.stable git://git.freeswitch.org/freeswitch.git
2. 安裝依賴環境:
yum install autoconf automake gcc-c++ git-core libjpeg-devel libtool make ncurses-devel pkgconfig
yum install unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel libtiff-devel libjpeg-devel python-devel expat-devel zlib zlib-devel bzip2 which
yum install sqlite-devel.x86_64
3. 開始安裝,依次執行以下命令:
./configure
若是有問題,系統會自動列出來。
make && make install && make hd-sounds-install && make hd-moh-install && make samples
我碰到的問題:
問題1:configure: error: Library requirements (sqlite3 >= 3.6.20) not met
辦法:
yum install sqlite-devel.x86_64
問題2:configure: error: Library requirements (libpcre >= 7.8) not met
辦法:
yum install pcre*
問題3:configure: error: Library requirements (speex >= 1.2rc1 speexdsp >= 1.2rc1) not met
辦法:yum install speex*
問題4:configure: error: You need to either install libldns-dev or disable mod_enum in modules.conf
辦法:
按提示沒有找到libldns-dev 包,因此我選擇disable mod_enum,作法以下:
[root@localhost freeswitch]#vi modules.conf
#applications/mod_enumpython

這裏若是確實不想屏蔽上述內容,能夠經過以下方法安裝支持庫:c++

yum install ldns*git


問題5:提示libedit-dev找不到。辦法:
 yum install libedit*sql

問題6:若是在make的時候提示:Neither yasm nor nasm have been foundapp

yasm是一個彙編編譯器,是nasm的升級版
yasm下載地址:http://www.tortall.net/projects/yasm/releases/curl

yasm解壓命令:tar -zxvf ****.tar.gz (我下載的是yasm-1.3.0.tar.gz)
yasm編譯安裝:① ./configure, ② make, ③make installui

4. 創建軟鏈接,以方便使用。
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/
5. freeswitch默認只支持聲音,添加視頻。修改conf/var.xml:
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=OPUS,G722,PCMU,PCMA,GSM"/>
<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA,GSM"/>
爲:
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU,PCMA,GSM,H264,H263-1998,H263"/>
<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA,GSM,H264,H263-1998,H263"/>
6. 經常使用命令:
freeswitch -nc後臺運行
fs_cli進入客戶端;/exit退出客戶端
freeswitch -stop中止freeswitch。url

相關文章
相關標籤/搜索