记录安装freeswitch的日常

已知安装版本:Linux:Centos7 Freeswitch:1.10.2
解:
注意:(最好呢是先下载好包,然后上传到这个所用的环境中)
1.安装对应依赖

yum install -y git alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel libdb4-devel e2fsprogs-devel erlang flite-devel g722_1-devel gcc-c++ gdbm-devel gnutls-devel ilbc2-devel ldns-devel libcodec2-devel libcurl-devel libedit-devel libidn-devel libjpeg-devel libmemcached-devel libogg-devel libsilk-devel libsndfile-devel libtheora-devel libtiff-devel libtool libuuid-devel libvorbis-devel libxml2-devel lua-devel lzo-devel mongo-c-driver-devel ncurses-devel net-snmp-devel openssl-devel pcre-devel perl perl-ExtUtils-Embed pkgconfig portaudio-devel postgresql-devel python-devel python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel wget which yasm zlib-devel libshout-devel libmpg123-devel lame-devel libatomic opus-devel

2.安装cmake(最好呢是先下载好包,然后上传到这个所用的环境中)

yum remove cmake #卸载yum安装的版本,若无安装则忽略
cd /usr/local/src
wget https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz
tar vzxf cmake-3.14.0.tar.gz
cd cmake-3.14.0
./configure
make
make install

3.安装libks

cd /usr/local/src
yum install libatomic
git clone https://github.com/signalwire/libks.git
cd libks
cmake .
make
make install

4.安装signalwire-c

cd /usr/local/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c/
cmake .
make
make install

5.编译x264

git clone http://git.videolan.org/git/x264.git
cd x264
./configure --disable-asm
make
make install

6.编译安装mod_av

在x264目录下执行以下操作
wget http://download1.rpmfusion.org/free/el/updates/7/x86_64/x/x264-libs-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
wget http://download1.rpmfusion.org/free/el/updates/7/x86_64/x/x264-devel-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
rpm -hiv x264-libs-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
rpm -hiv x264-devel-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
cd /usr/local/src
git clone https://gitee.com/nwaycn/libav.git
cd libav
./configure --enable-pic --enable-shared  --enable-libx264 --enable-gpl --extra-libs="-ldl"
make                                                                                  
make install
cp /usr/local/lib/pkgconfig/libavcodec.pc    /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavdevice.pc   /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavfilter.pc   /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavformat.pc   /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavresample.pc /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavutil.pc     /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libswscale.pc    /usr/lib64/pkgconfig/
ldconfig  #动态链接库管理命令,其目的为了让动态链接库为系统所共享

7.编译freeswitch

cd /usr/local/src/
tar -zxvf freeswitch-1.10.2.-release.tar.gz
cd freeswitch-1.10.2.-release
./configure 
./configure --enable-core-odbc-support
(带ODBC参数需要)
yum -y install unixODBC-devel.x86_64 mysql-connector-odbc.x86_64
(带MP3播放支持)
./configure --enable-core-odbc-support --enable-core-odbc-support --enable-libmp3lame
--prefix=/usr/local/freeswitch
make
make install

到这里了就已经安装成功了,然后再测试下就ok了。

上一篇:python中的正则表达式全解


下一篇:FreeSWITCH的xml_rpc调用示例