#服务器环境准备,安装FFmpeg,安装此环境用于编译mod_av
yum install epel-release -y
yum update -y
su -c 'yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm'
yum install ffmpeg ffmpeg-devel -y
#上述步骤执行完后ffmpeg -version检查是否安装成功。
#下载rpm包
yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
#安装yum工具
yum install yum-utils
#开始安装,请依次执行以下命令操作:
yum-builddep -y freeswitch
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git
yum install -y devtoolset-4-gcc*
scl enable devtoolset-4 'bash'
#切换至src目录准备克隆freeswitch源码
cd /usr/local/src
#克隆源码下来
git clone -b v1.10 https://github.com/signalwire/freeswitch.git freeswitch
#切换Freeswitch的源码目录,准备编译安装
cd /usr/local/src/freeswitch
#执行编译前命令
./bootstrap.sh -j
./configure --enable-portable-binary \
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-gnu-ld --with-python --with-erlang --with-openssl \
--enable-core-odbc-support --enable-zrtp
#编译
make
#编译并安装
make -j install
#安装声音模块
make -j cd-sounds-install
#安装mod模块
make -j cd-moh-install