freeswitch 源码编译安装

一、安装依赖
freeswitch的依赖非常多,如果不安装依赖就开始编译freeswitch,那就遇到更多的问题,安装依赖之后,可以解决90%以上的问题。
安装依赖命令如下:
yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum install -y yum-utils --enablerepo=extras
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git wget vim devtoolset-7-gcc* devtoolset-7 libtiff-devel cmake3 libatomic unixODBC unixODBC-devel.x86_64 postgresql-libs postgresql-devel libpqxx-devel
yum install -y gcc-c++ autoconf automake libtool ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel libxml2-devel libyuv-devel libvpx-devel libvpx2* libdb4* libidn-devel unbound-devel libuuid-devel lua-devel libsndfile-devel yasm-devel
yum install libjeg-devel libjpeg-turbo-devel
yum install yasm
yum install libshout-devel
yum install mpg123-devel
yum install libsndfile-devel
yum install opus-devel

yum 安装出错 地址过期了换成阿里的

yum install 报错: Cannot find a valid baseurl for repo: centos-sclo-rh/x86_64
问题原因
CentOS7的SCL源在2024年6月30日停止维护了。 当scl源里面默认使用了centos官方的地址,无法连接,需要替换为阿里云。

解决办法
1、
重命名原来的文件:
cd /etc/yum.repos.d/
mv CentOS-SCLo-scl.repo CentOS-SCLo-scl.repo.bak
mv CentOS-SCLo-scl-rh.repo CentOS-SCLo-scl-rh.repo.bak
vim CentOS-SCLo-rh.repo
粘贴以下内容:
[centos-sclo-rh]
name=CentOS-7 - SCLo rh
baseurl=https://mirrors.aliyun.com/centos/7/sclo/x86_64/rh/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

编译的时候如果遇到 lib版本不一致 autoreconf -fiv

二、下载源码
freeswitch下载地址: https://github.com/signalwire/freeswitch.git
另外有两个比较重新的库需要手动安装,分别是spandsp和sofia-sip
下载命令:
cd /data
git clone -b v1.10.7 https://github.com/signalwire/freeswitch
cd /data/freeswitch
git clone https://github.com/freeswitch/spandsp.git
git clone https://github.com/freeswitch/sofia-sip.git

三、编译
1.编译必需库
首先,要先编译spandsp和sofia-sip, 否则freeswitch在configure阶段会报错。
#编译spandsp
cd /data/freeswitch/spandsp
./bootstrap.sh
./configure
make
make install
#编译sofia-sip
sudo yum install autoconf
cd /data/freeswitch/sofia-sip
./bootstrap.sh
./configure
make
make install
#添加库的路径到系统
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
ldconfig

四:进入解压的freeswitch目录
./rebootstrap.sh
./configure
autoreconf -fiv
make
make instal
五:安装完成启动fs
cd /usr/local/freeswitch/bin
./freeswitch -nc

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值