参考:
https://developer.aliyun.com/article/954386
https://www.ai2news.com/blog/255316/
yum install gcc gcc-c++ 注意gcc需要4.8.5不能太高
yum install -y wget zlib-devel libjpeg-devel freetype-devel
官方插件
yum install -y epel-release
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 opus-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 rpm-build libX11-devel libyuv-devel
#安装
wget https://files.freeswitch.org/downloads/libs/libyuv-0.0.1280.tar.gz
tar -xvf libyuv-0.0.1280.tar.gz
cd libyuv-0.0.1280
make && make install
cd ..
mkdir -p /usr/lib64/pkgconfig/
cp /usr/lib/pkgconfig/libyuv.pc /usr/lib64/pkgconfig/
#安装
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -xvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make && make install
cd ..
#安装
wget https://files.freeswitch.org/downloads/libs/libvpx-1.4.0.tar.gz
tar -xvf libvpx-1.4.0.tar.gz
cd libvpx-1.4.0
./configure
./configure --enable-pic --enable-static --enable-shared --as=yasm --target=generic-gnu
make && make install
cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/
cd ..
make clean && ./configure && make
#安装有devel不安装此
wget https://files.freeswitch.org/downloads/libs/libsndfile-1.0.16.tar.gz
tar -xvf libsndfile-1.0.16.tar.gz
cd libsndfile-1.0.16
./configure
make && make install
cp /usr/local/lib/pkgconfig/sndfile.pc /usr/lib64/pkgconfig
cd ..
#不安装这个
wget https://files.freeswitch.org/downloads/libs/spandsp-3.0.0-6ec23e5a7e.tar.gz
tar -xvf spandsp-3.0.0-6ec23e5a7e.tar.gz
cd spandsp
./bootstrap.sh -j
./configure
make && make install
cd ..
#安装
cd /usr/src/
git clone https://github.com/freeswitch/spandsp.git
cd spandsp-master
./bootstrap.sh -j
./configure
make
make install
ldconfig
cd ..
#安装
cd /usr/src/freeswitch
git clone https://github.com/freeswitch/sofia-sip.git
wget https://files.freeswitch.org/downloads/libs/sofia-sip/sofia-sip-1.13.5-afa7ebb814.tar.gz
tar -xvf sofia-sip-1.13.5-afa7ebb814.tar.gz
cd sofia-sip
./bootstrap.sh -j
./configure
make
make install
ldconfig
#安装
https://libav.org/releases/libav-12.3.tar.gz
wget https://files.freeswitch.org/downloads/libs/libav-12.tar.bz2
tar -xvf libav-12.tar.bz2
cd libav
./bootstrap.sh -j
./configure
make
make install
cp /usr/local/lib/pkgconfig/libavformat.pc /usr/lib64/pkgconfig
cp /usr/local/lib/pkgconfig/libswscale.pc /usr/lib64/pkgconfig
ldconfig
cd /usr/src/freeswitch
git clone -b v1.6 https://github.com/signalwire/freeswitch.git
cd freeswitch
./bootstrap.sh -j
#安装目录是/usr/local/freeswitch_1620 输出到日志可以直观查看有哪些错误
./configure --prefix=/usr/local/freeswitch_1620 --disable-multilib --with-lib-subdir=/usr/lib64 > configure.log
make
make install
ln -s /usr/local/freeswitch_1620/bin/freeswitch /usr/bin/freeswitch
ln -s /usr/local/freeswitch_1620/bin/fs_cli /usr/bin/fs_cli
#启动
./freeswitch -nc
错误:php-config: command not found
yum install php php-devel
错误:'libtoolT': No such file or directory
touch libtoolT #新建一个空文件
vi /usr/local/src/freeswitch/src/mod/applications/mod_av/Makefile
vi /usr/local/src/freeswitch/src/mod/formats/mod_sndfile/Makefile
vim freeswitch/src/mod/codecs/mod_opus/Makefile中注释掉896 和 897
#install: error
#all: error
#安装libopus_dev(无效不用安装)
https://www.opus-codec.org/downloads/
wget https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
tar -xvf opus-1.3.1.tar.gz
cd opus-1.3.1
BUILD_LIBS=$/build_libs
./configure --with-pic --enable-float-approx # --prefix=$
make
make install
或者
#mod_opus安装失败的解决方案
yum list opus
yum remove -y opus
wget http://pkgrepo.linuxtech.net/el6/release/x86_64/libopus-1.1-1.el6.x86_64.rpm
rpm -Uvh libopus-1.1-1.el6.x86_64.rpm
#再下载opus-devel 1.1
wget http://pkgrepo.linuxtech.net/el6/release/x86_64/libopus-devel-1.1-1.el6.x86_64.rpm
#安装
rpm -Uvh libopus-devel-1.1-1.el6.x86_64.rpm
#重新执行 freeswitch make