转载原博客:http://blog.csdn.net/u012121105/article/details/74238595
centos7下安装freeswitch版本:1.6。
1.下载源代码:
进入目录 cd /usr/local/src
克隆原代码
git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch
2.开始编译
进入freeswitch目录 cd/ freeswitch
运行 ./bootstrap.sh
如果会出现类似autoconf not found错误提示,是因为没有下载第三方依赖库。
freeswitch依赖的第三方库有:gcc-c++ ,wget alsa-lib-devel, autoconf ,automake ,bison ,broadvoice-devel ,bzip2 ,curl-devel, db-devel ,e2fsprogs-devel, flite-devel ,g722_1-devel, 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 ,libtiff-devel ,libtheora-devel, libtool, 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, python26-devel ,python-devel ,soundtouch-devel,speex-devel, sqlite-devel ,unbound-devel, unixODBC-devel ,libuuid-devel ,which yasm zlib-devel。
3.安装依赖库:
(1)可以一个个安装,如下:
1. yum install autoconf
2. yum install automake
3. yum install libtool
……
(2)也可以全部一起安装:
yum install -y git gcc-c++ wget alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel db-devel e2fsprogs-devel flite-devel g722_1-devel 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 libtiff-devel libtheora-devel libtool 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 python26-devel python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel libuuid-devel which yasm zlib-devel
4.再一次编译
运行 ./bootstrap.sh
接着运行 ./configure
如果出现以下界面,就是默认配置成功.
5.运行 make 命令
如果出现以下界面,则编译成功。
6.安装
运行make install命令
如果出现以下界面,则安装成功。
7.启动freeswitch
进入cd /usr/local/freeswitch/bin/目录,然后运行 ./freeswitch命令。
如果出现以下界面,则运行成功。
8.配置freeswitch在任何一个路径都可以运行
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/
9.如果运行freeswitch出现以下错误,是因为端口被占用了。
[root@localhost ~]# freeswitch
Cannot lock pid file /usr/local/freeswitch/run/freeswitch.pid.
解决办法:可以重启Linux或者关闭占用端口的进程。
10.如果freeswitch启动成功,但是linphone注册不上。
解决办法:systemctl stop firewalld.service (关闭防火墙)