1. 程式人生 > >freeswitch 在redhat 7.0/centos 7.0上的編譯安裝

freeswitch 在redhat 7.0/centos 7.0上的編譯安裝

 參考官方文件:

https://freeswitch.org/confluence/display/FREESWITCH/CentOS+7

https://freeswitch.org/confluence/display/FREESWITCH/CentOS+7+and+RHEL+7

1) Make sure yum update is run and CentOS is up-to-date
2) {optional} inside Terminal window select Edit Profile Preferences and select "Use custom default terminal size" and make it 160 x 60.  Close terminal and re-open for the change to take affect.
3) yum -y install git
4) yum -y install epel-release
5) rpm -Uvh http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm
6) yum -y install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel libxml2-devel
7) yum -y install libyuv-devel opus-devel libvpx-devel libvpx2* libdb4* libidn-devel unbound-devel libuuid-devel lua-devel libsndfile-devel
8) cd /usr/local/src
9) git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git
10) cd /usr/local/src/freeswitch
11) ./bootstrap.sh
12)          ./configure
13)          make
14) make install
15) make cd-sounds-install
16) make cd-moh-install
17) cd /usr/local/freeswitch/conf
18) vi vars.xml
                                Change:  <X-PRE-PROCESS cmd="set" data="default_password=1234"/> {!!set it to something different!!}
                                Save and close (<Esc> :wq!)
19) cd /usr/local/freeswitch/conf/sip_profiles
20) mv internal-ipv6.xml internal-ipv6.xml.removed   {disables ipv6 support}
21) mv external-ipv6.xml external-ipv6.xml.removed  {disables ipv6 support}
22) cd /usr/local/freeswitch/bin
23) ./freeswitch -nonat -nonatmap
24) ... to exit from FreeSWITCH console


報錯:

Neither yasm nor nasm have been found. See the prerequisites section in the README for more info.

這個只需要安裝yasm

有兩種方法

1)

yum install yasm

2)

wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar zxvf yasm-1.2.0.tar.gz
cd yasm-1.2.0/
./configure
make
make install

還有個執行 ./configure後面後很多引數。依賴比較多。建議不需要的不要enable