系统相关
首页 > 系统相关> > linux下freeswitch安装详细教程

linux下freeswitch安装详细教程

作者:互联网

前言:本次安装freeswitch为1.6.0版本,其他版本可能出现异常

1:下载安装依赖环境

yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release

2:安装依赖包,安装以下1、2、3依赖包

(1)

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

(2)

yum install libjpeg-devel lua-devel libsndfile-devel libyuv-devel git libtool -y

(3)

yum install kernel-headers –y

3:安装freeswitch安装包

可以直接下载或者安装包解压方式安装,建议用第二种,第一种没有尝试

(1)下载安装:git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch

(2)解压包安装:https://download.csdn.net/download/mokeily99/76668375 免费下载

以下按照(2)方式安装,将下载下来的freeswitch-1.6.0.tar.gz压缩包上传至/usr/local/src目录下。

运行以下命令解压

cd /usr/local/src
tar -zxvf /usr/local/src/freeswitch-1.6.0.tar.gz

解压后目录下会出现freeswitch-1.6.0文件夹,下面安装libyuv-master、libvpx-master、libpng-maste三个lib

安装libyuv-master

下载libyuv-master.zip:libyuv-master.zip-其它文档类资源-CSDN下载

cd /usr/local/src/freeswitch-1.6.0/libs
midir libyuv

将libyuv-master.zip上传至/usr/local/src/freeswitch-1.6.0/libs/libyuv

cd /usr/local/src/freeswitch-1.6.0/libs/libyuv
unzip libyuv-master.zip

make -f linux.mk CXXFLAGS="-fPIC -O2 -fomit-frame-pointer -Iinclude/"
make install
cp /usr/lib/pkgconfig/libyuv.pc /usr/lib64/pkgconfig/

安装libvpx-master

 下载libvpx-master.zip:libvpx-master-其它文档类资源-CSDN下载

cd /usr/local/src/freeswitch-1.6.0/libs
midir libvpx

将libvpx-master.zip上传至/usr/local/src/freeswitch-1.6.0/libs/libvpx

cd /usr/local/src/freeswitch-1.6.0/libs/libvpx
unzip libvpx-master.zip

./configure --enable-pic --disable-static --enable-shared
make
make install
cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/

安装libpng-master

下载libpng-master.zip:libpng-master-其它文档类资源-CSDN下载

cd /usr/local/src/freeswitch-1.6.0/libs
midir libpng

将libpng-master.zip上传至/usr/local/src/freeswitch-1.6.0/libs/libpng

cd /usr/local/src/freeswitch-1.6.0/libs/libpng
unzip libpng-master.zip

./configure
make
make install
cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/

4:编译Freeswitch

编译

cd /usr/local/src/freeswitch-1.6.0
sh rebootstrap.sh
./configure
make
make install

运行以上命令中间可能会好使几分钟

./configure后成功如下图

 make后确保没有报错信息,如有错误信息确认libyuv-master、libvpx-master、libpng-master三个组件是否安装中出现错误。

make install后出现以下图成功

以上 成功后/usr/local下会出现freeswitch的目录

禁用IPV6

mv /usr/local/freeswitch/conf/sip_profiles/internal-ipv6.xml /usr/local/freeswitch/conf/sip_profiles/internal-ipv6.xml.bk

mv /usr/local/freeswitch/conf/sip_profiles/external-ipv6.xml /usr/local/freeswitch/conf/sip_profiles/external-ipv6.xml.bk

添加启动软连接

ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/

ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/

安装声音文件

cd /usr/local/src/freeswitch-1.6.0
make cd-sounds-install
make cd-moh-install

声音文件安装会耗时很久,耐心等待

 5:启动Freeswitch

cd /usr/local/src/freeswitch-1.6.0/bin
freeswitch -c -nonat –rp

以上启动为控制台启动,启动后可之间查看到控制台日志,方便调试

以上为常规freeswitch安装启动步骤,下篇记录百度Mrcp Server智能语音搭建及集成freeswitch步骤。如有疑问及合作邮箱联系mokeily99@126.com

标签:教程,1.6,devel,master,usr,linux,freeswitch,local
来源: https://blog.csdn.net/mokeily99/article/details/122579292