Centos Freeswitch1.10.10源码一键编译


前言

本文提供一键安装脚本。详细内容如下:

一、安装相关依赖

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

二、编译sofia-sip

提示:soifa-sip的版本必须大于1.13.15

# 下载sofia-sip源码
wget -N -t 0 https://codeload.github.com/freeswitch/sofia-sip/zip/refs/tags/v1.13.15 -O sofia-sip-1.13.15.zip
unzip sofia-sip-1.13.15.zip
cd sofia-sip-1.13.15
./bootstrap.sh
# 指定编译目录[/home/switch/freeswitch],可以根据需要调整目录
./configure --prefix=/home/switch/freeswitch
make && make install

三、编译spandsp

提示:默认使用master版本

# 下载spandsp源码
wget -N -t 0 https://codeload.github.com/freeswitch/spandsp/zip/refs/heads/master -O spandsp-master.zip
unzip spandsp-master.zip
cd spandsp-master
./bootstrap.sh
# 指定编译目录[/home/switch/freeswitch],可以根据需要调整目录
./configure --prefix=/home/switch/freeswitch
make && make install

四、编译freeswitch-1.10.10

# 添加系统lib库搜索路径,这个一定要执行,否则在编译时会提示找不到sofia-sip和spandsp库文件
export PKG_CONFIG_PATH=/home/switch/freeswitch/lib/pkgconfig
ldconfig
# 下载freeswitch源码
wget -N -t 0 https://codeload.github.com/signalwire/freeswitch/zip/refs/tags/v1.10.10 -O freeswitch-1.10.10.zip
unzip freeswitch-1.10.10.zip
cd freeswitch
./bootstrap.sh
# 先注释mod_av模块,该模块用于视频通话,需要安装FFMPEG和libx64才能编译通过
sed -i 's/applications\/mod_av/#applications\/mod_av/g' modules.conf
# 先注释mod_signalwire,该模块是官方提供的GUI(不好用)
sed -i 's/applications\/mod_signalwire/#applications\/mod_signalwire/g' modules.conf
# 先注释mod_verto,该模块是官方提供对接webrtc模块
sed -i 's/endpoints\/mod_verto/#endpoints\/mod_verto/g' modules.conf
sed -i 's/codecs\/mod_opus/#codecs\/mod_opus/g' modules.conf
# 指定编译目录[/home/switch/freeswitch],可以根据需要调整目录
./configure -C --with-lib-subdir=/home/switch/freeswitch/lib --prefix=/home/switch/freeswitch --disable-fhs --enable-portable-binary --enable-sctp --with-gnu-ld --with-openssl --enable-zrtp --enable-core-odbc-support CFLAGS="-Wno-error"
make && make install
# 设置软连接
ln -sf /home/switch/freeswitch/bin/freeswitch /usr/bin/freeswitch
ln -sf /home/switch/freeswitch/bin/fs_cli /usr/bin/fs_cli

总结

希望此文可以帮助到大家!遇到啥问题,可评论留言。

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值