centos7.3安装部署freeswitch

切换yum源为阿里镜像源

cp -r /etc/yum.repos.d /etc/yum.repos.d.bak

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

sudo yum clean all

sudo yum makecache

sudo yum update -y

安装 FreeSWITCH 的 YUM 软件仓库配置文件和 EPEL

sudo yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
sudo yum update -y

安装相关工具

sudo yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git
sudo yum install -y devtoolset-4-gcc* sqlite-devel libcurl-devel pcre pcre-devel speex speex-devel ldns-devel yasm libopus-devel opus-devel
sudo yum install --skip-broken -y 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 libcodec2-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 perl perl-ExtUtils-Embed pkgconfig portaudio-devel postgresql-devel \
    python-devel soundtouch-devel unbound-devel unixODBC-devel wget which zlib-devel \
    libshout-devel libmpg123-devel lame-devel

安装cmake

mkdir ~/src
cd ~/src
wget --timeout=120 --tries=5 https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz
tar zxf cmake-3.14.0.tar.gz
cd cmake-3.14.0
./configure && make -j2 && make install

源码编译安装依赖


cd ~/src
#安装依赖 libatomic
sudo yum install -y libatomic
git clone https://github.com/signalwire/libks.git
cd libks
sudo yum install -y libuuid-devel
cmake .
make -j3 && make install


#安装依赖 signalwire-c
cd ~/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c/
cmake .
make -j3 && make install
ln -sf /usr/local/lib64/pkgconfig/signalwire_client.pc /usr/lib64/pkgconfig/signalwire_client.pc

#安装依赖 nasm
cd ~/src
wget --timeout=120 --tries=5 https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.gz
tar -zxf nasm-2.13.03.tar.gz
cd nasm-2.13.03
./configure && make -j3 && make install


#安装依赖 x264
cd ~/src
git clone http://git.videolan.org/git/x264.git
cd x264
./configure && make -j3 && make install

#安装依赖
cd ~/src
wget --timeout=120 --tries=5 http://download1.rpmfusion.org/free/el/updates/7/x86_64/x/x264-libs-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
wget --timeout=120 --tries=5 http://download1.rpmfusion.org/free/el/updates/7/x86_64/x/x264-devel-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
rpm -hiv x264-libs-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
rpm -hiv x264-devel-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
cd /usr/local/src
wget https://github.com/libav/libav/archive/refs/tags/v12.3.zip 
unzip v12.3.zip
cd libav-12.3
./configure  --enable-shared --disable-static && make -j3 && make install

cp -f /usr/local/lib/pkgconfig/* /usr/lib64/pkgconfig/
ldconfig

#安装依赖 sofia-sip
cd ~/src
git clone https://github.com/freeswitch/sofia-sip
cd sofia-sip
sudo yum install -y autoconf automake libtool
sh autogen.sh
./configure && make -j3 && make install


#安装依赖 spandsp
cd ~/src
git clone https://github.com/freeswitch/spandsp
cd spandsp
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4
sh autogen.sh
./configure && make -j3 && make install

sudo cat > /etc/yum.repos.d/linuxtech.repo <<EOF
[linuxtech]
name=LinuxTECH
baseurl=http://pkgrepo.linuxtech.net/el6/release/
enabled=1
gpgcheck=1
gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET
EOF

sudo yum install -y libopus-devel
cd ~/src
wget --timeout=120 --tries=5 https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
tar xvfz opus-1.3.1.tar.gz
cd opus-1.3.1
./configure && make -j3 && make install

cp -f /usr/local/lib/pkgconfig/* /usr/lib64/pkgconfig/
ldconfig

安装 freeswitch


#安装freeswitch 1.10.8版本
cd ~/src
wget https://files.freeswitch.org/releases/freeswitch/freeswitch-1.10.8.-release.tar.gz
tar xfz freeswitch-1.10.8.-release.tar.gz
cd freeswitch-1.10.8.-release
yum install -y libopus-devel
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

# 编辑 modules.conf 删除下面两个 module
sed -i '/mod_verto/d;/mod_signalwire/d' modules.conf
./configure --disable-core-libedit-support

#安装freeswitch
make -j3
make install

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值