原来 Freeswitch1.10.2 安装这么简单!!

安装版本

Linux:Centos7
Freeswitch:1.10.2

前言:初次接触Freeswitch,安装的时候碰到了很多坑,文章也采取了很多前辈的经验,由此记录下来

,为后来的同学少踩一些坑....

目录

1、下载freeswitch安装包(freeswitch-1.10.2.-release.tar.gz)

2、安装对应依赖

3、安装cmake

4、安装libks

5、安装signalwire-c

6、编译x264

7、编译安装mod_av

8、编译freeswitch

9、配置freeswitch任何路径启动

9、freeswitch 后台启动  


 

1、下载freeswitch安装包(freeswitch-1.10.2.-release.tar.gz)

https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.10.x+Release+notes

 

2、安装对应依赖

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

 

3、安装cmake

yum remove cmake #卸载yum安装的版本,若无安装则忽略
cd /usr/local/src
wget https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz
tar vzxf cmake-3.14.0.tar.gz
cd cmake-3.14.0
./configure
make
make install

 

4、安装libks

cd /usr/local/src
yum install libatomic
git clone https://github.com/signalwire/libks.git
cd libks
cmake .
make
make install

 

5、安装signalwire-c

cd /usr/local/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c/
cmake .
make
make install
ln -sf /usr/local/lib64/pkgconfig/signalwire_client.pc /usr/lib64/pkgconfig/signalwire_client.pc

 

6、编译x264

git clone http://git.videolan.org/git/x264.git
./configure –disable-asm
make
make install

 

7、编译安装mod_av

wget http://download1.rpmfusion.org/free/el/updates/7/x86_64/x/x264-libs-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
wget 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
git clone https://gitee.com/nwaycn/libav.git
cd libav
./configure --enable-pic --enable-shared  --enable-libx264 --enable-gpl --extra-libs="-ldl"
make                                                                                  
make install
cp /usr/local/lib/pkgconfig/libavcodec.pc    /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavdevice.pc   /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavfilter.pc   /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavformat.pc   /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavresample.pc /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavutil.pc     /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libswscale.pc    /usr/lib64/pkgconfig/
ldconfig  #动态链接库管理命令,其目的为了让动态链接库为系统所共享

 

8、编译freeswitch

cd /usr/local/src/
tar vzxf freeswitch-1.10.2.-release.tar.gz
cd freeswitch-1.10.2.-release
./configure 
make
make install
# freeswitch其默认的安装位置是/usr/local/freeswitch

 

 

9、配置freeswitch任何路径启动

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

9、freeswitch 后台启动  

# 后台启动命令
freeswitch -nc -rp

# 进入命令
fs_cli

# 退出命令
/exit 
/bye 
等等...

# fs_cli报错
fs_cli.c:1673 main() Error Connecting [] 
# 解决方法
vim /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml 
  改为 

好了,至此Freeswitch初步完成!

如有问题,请在下方留下您宝贵的建议!

你可能感兴趣的:(Freeswitch)