优秀的编程知识分享平台

网站首页 > 技术文章 正文

FreeSwitch最新版本1.10.7 release的无坑安装指南

nanyue 2024-08-13 07:54:13 技术文章 9 ℃

yum安装freeswitch-1.10.7的第三方信赖

yum install -y git wget lrzsz
yum install -y autoconf automake libtool openssl* libtiff* libjpeg*
yum install -y gcc gcc-c++
yum install -y unixODBC-devel.x86_64
yum install -y mysql-connector-odbc.x86_64
yum install -y sqlite-devel
yum install -y curl-devel
yum install -y ldns-devel
yum install -y libedit-devel
yum install -y nasm
yum install -y lua-devel
yum install -y opus-devel
yum install -y postgresql-devel
yum install -y libsndfile-devel

安装两个SIP依赖库:sofia-sip 和 spandsp

git clone https://github.com/freeswitch/sofia-sip
cd sofia-sip
./bootstrap.sh
./configure
make
make install
git clone https://github.com/freeswitch/spandsp
cd spandsp
./bootstrap.sh
./configure
make
make install

安装mp3格式支持模块

yum install -y libshout-devel lame-devel libmpg123-devel
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar -zxvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --enable-static --enable-shared
make
make install

导入第三方信赖的头文件和库文件

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

安装 epel扩展

yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum install yum-utils
yum-builddep -y freeswitch --skip-broken
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools

下载freeswitch-1.10.7.-release.tar.gz

https://files.freeswitch.org/releases/freeswitch/freeswitch-1.10.7.-release.tar.gz

并开始编译安装freeswitch-1.10.7步骤

tar -zxvf freeswitch-1.10.7.-release.tar.gz
cd freeswitch-1.10.7.-release
./rebootstrap.sh

此时可以编辑配置需要编译的freeswitch模块,vi modules.conf 可以注释掉不需要使用的模块。

vi modules.conf #注释掉不需要的视频模块 mod_av 和 mod_signalwire

./configure --enable-portable-binary \
--prefix=/usr/local/freeswitch \
--with-gnu-ld --with-openssl \
--enable-core-odbc-support --enable-zrtp \
--enable-libmp3lame
make
make -j install
make -j cd-sounds-install
make -j cd-moh-install

疑难模块编译错误的解决

报错You must install libopus-dev to build mod_opus. Stop. 但确实已经 yum 安装 libopus-dev 或 opus-devel 后依然报错:

解决方法:

yum remove opus
wget 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
make install
cp /usr/lib/pkgconfig/opus.* /usr/lib64/pkgconfig/

在安装过程中遇到未安装依赖包的错误,在正确安装依赖包后,需要重新make编译

make clean
./configure ...
make ...

启动Freeswitch

/usr/local/freeswitch/bin/freeswitch -nonat -nosql
最近发表
标签列表