centos7.9 從源碼編譯安裝 Freeswitch1.10.6


本文基於操作系統環境:centos7.9 , 必須具備連接公網的條件,否則無法安裝成功。

 

本文相關資源下載地址,點擊這里。    

 

1.   首先安裝兩個依賴庫: Sofia-sip 和 spandsp

     說明國內的網絡環境訪問github不太穩定,可以經過海外主機下載  sofia-sip 和 spandsp 之后,打包拷貝到本地。

yum -y install autoconf automake git libtool openssl* libtiff* libjpeg*
git clone https://github.com/freeswitch/sofia-sip cd sofia-sip ./bootstrap.sh ./configure make make install

  git clone https://github.com/freeswitch/spandsp
  cd spandsp
  ./bootstrap.sh
  ./configure
  make
  make install

  export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig


2. 安裝 epel擴展和文件傳輸工具lrzsz及vim、安裝相關依賴庫
   

yum install -y epel-release lrzsz vim
yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm
yum-builddep -y freeswitch   --skip-broken 
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git

 

注意: a.        在使用yum install的時候,偶爾會碰見這樣的錯誤:Couldn’t open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
                這是因為在  /etc/yum.repos.d 目錄下有關於yum repository的配置文件中列有如下的GPG key:
                gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
                而YUM在路徑 /etc/pki/rpm-gpg 下找不到這個GPG key的時候,就會報如上的錯誤了。

              解決方案:

cd /etc/pki/rpm-gpg
wget https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
然后再次運行 yum install 命令就可以成功了。

 

             b.        執行  yum-builddep -y freeswitch 時候, 如果出現以下錯誤,說明 epel 源 訪問有問題,請檢查網絡;

Error: No Package found for ldns-devel
Error: No Package found for libedit-devel
Error: No Package found for libmemcached-devel
Error: No Package found for libmpg123-devel >= 1.20.1
Error: No Package found for libogg-devel
Error: No Package found for libshout-devel >= 2.2.2
Error: No Package found for libtheora-devel
Error: No Package found for libvorbis-devel
Error: No Package found for lua-devel
Error: No Package found for speex-devel

 

3. 下載 freeswitch-1.10.6.-release.zip ,存放到 /home/fs/ 目錄

    官方源碼包下載目錄: https://files.freeswitch.org/releases/freeswitch/  選擇最新的 1.10.6

 

4.  解壓縮  freeswitch-1.10.6.-release.zip 並開始以下編譯安裝步驟:

      

cd  /home/fs/

unzip -d . freeswitch-1.10.6.-release.zip 
cd freeswitch-1.10.6.-release
vim  modules.conf  #注釋掉不需要的視頻模塊 mod_av 和 mod_signalwire 

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./rebootstrap.sh -j

./configure       #此時的默認安裝目錄是 /usr/local/freeswitch/


autoreconf -fiv

make

make install

 

5.  啟動Freeswitch:  /usr/local/freeswitch/bin/freeswitch  -nonat -nosql 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM