广告 《大道至简,给所有人看的编程课》 🔥

《FreeSWITCH案例大全》

1.8 CentOS 编译安装FreeSWITCH

lihefengbj

本文以CentOS Linux release 7.9.2009 (Core)和FreeSWITCH1.6.20为例,介绍编译安装FreeSWITCH的方法。

1.8.1 先安装FreeSWITCH的依赖库

安装依赖库前需要申请signalwire官网账号令牌,比如账号令牌分别为myusermytoken。如下依赖库通过yum源安装。

向etc环境写入signalwire官网账号密码

echo "myuser" > /etc/yum/vars/signalwireusername
echo "mytoken" > /etc/yum/vars/signalwiretoken

下载安装FreeSWITCH rpm包源

yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm 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

1.8.2 下载编译安装FreeSWITCH源码

下载FreeSWITCH1.6.20源码

cd /usr/local/src
git clone -b v1.6.20 https://github.com/signalwire/freeswitch.git freeswitchV1.6.20

编译FreeSWITCH1.6.20源码

cd /usr/local/src/freeswitchV1.6.20
./bootstrap.sh -j
make

安装

make -j install
make -j cd-sounds-install
make -j cd-moh-install


本书版权所有 © 杜金房及各位贡献者 2016-2023,仅供在线阅读,谢绝一切形式转载。 本书还在写作中,持续更新。 如果你也想写上几句,欢迎加入我们。 | 返回首页 |