Centos7下Freeswitch1.6安装

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Centos7下Freeswitch1.6安装FreeSwitch 1.6安装环境

FreeSwitch 1.6版本安装,系统环境Centos7_x64(在Centos6.5下make安装不通过,官方也不建议在Centos6.5环境安装)数据库PostgreSQL_9.5(原生支持)

参考链接:

https:///confluence/display/FREESWITCH/CentOS+7+and+RHEL+7

https:///confluence/display/FREESWITCH/PostgreSQL+in+the+core

关闭Selinux

setenforce 0

/bin/sed -i -e s,'SELINUX=enforcing','SELINUX=disabled', /etc/selinux/config

关闭防火墙

systemctl stop firewalld.service

systemctl disable firewalld.service

添加FreeSwitch 1.6的RPM库

yum install -y /freeswitch-release-1-6.noarch.rpm

安装软件必须的依赖包

yum install -y gitgcc-c++ autoconfautomakelibtoolwget python

ncurses-develzlib-devellibjpeg-developenssl-devel e2fsprogs-devel

sqlite-devellibcurl-develpcre-develspeex-develldns-devellibedit-devel

libxml2-devel libyuv-devel opus-devellibvpx-devel libvpx2* libdb4* libidn-devel unbound-devellibuuid-devellua-devellibsndfile-develyasm-develbr

Centos7下安装freeswitch还需要安装以下几个依赖库

yum install -y libvpx2-devel libyuv-devel opus-devel

添加数据库ODBC支持

yum install -y unixODBC-devellibpq*

安装PostgreSQL

yum -y install

https:///pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-cen tos95-9.5-2.noarch.rpm

yum -y install postgresql95-server postgresql95-contrib stgresql95-odbc postgresql95-devel

初始化数据库

/usr/pgsql-9.5/bin/postgresql95-setup initdb

启动postgresql及添加开机启动

systemctl start postgresql-9.5.service

systemctl enable postgresql-9.5.service

配置postgresql环境变量

export PKG_CONFIG_PATH=/usr/pgsql-9.5/lib/pkgconfig

export PATH=/usr/pgsql-9.5/bin:$PATH

安装FreeSwitch 1.6

cd /usr/local/src

git clone -b v1.6 https:///stash/scm/fs/freeswitch.git

cd /usr/local/src/freeswitch

-J参数生成多个线程来加快构建过程

./bootstrap.sh -j

如果你想添加或删除模块的建立、编辑此目录下的modules.conf,say/mod_say_zh表示加载中文语音模块“--enable-core-pgsql-support”添加对postgresql原生支持

./configure --enable-core-pgsql-support

make

make install

make cd-sounds-install

make cd-moh-install

创建FreeSwitch用户

useraddfreeswitch

cd /usr/local/

chown -R freeswitch:freeswitchfreeswitch

chmod -R g+wfreeswitch

添加FreeSwitch开机启动项

cd /usr/local/src/freeswitch/build/

cpfreeswitch.service /lib/systemd/system/

chmod 750 /lib/systemd/system/freeswitch.service

cpfreeswitch.sysconfig /etc/sysconfig/freeswitch

建立软连接

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

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

启动freeswitch

systemctl start freeswitch.service

systemctl enable freeswitch.service

若启动失败使用systemctl status freeswitch.service看错误日志

在postgresql里添加数据账户freeswitch,数据格式设置为UTF8

sudo -u postgres /usr/pgsql-9.5/bin/createuser -s -e freeswitch

sudo -u postgres /usr/pgsql-9.5/bin/createdb -E UTF8 -O freeswitchfreeswitch 添加PostgreSQL链接

修改/usr/local/freeswitch/conf/autoload_configs/switch.conf.xml在前添加

修改pg_hba.conf使freeswitch链接为信任

编辑/var/lib/pgsql/9.5/data/pg_hba.conf

将下面代码idnet改为trust

host all all 127.0.0.1/32 ident

重启PostgreSQL及Freeswitch完成安装

相关文档
最新文档