安装
1.yum 安装FreeSWITCH
yum -y updateyum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-releaseyum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*systemctl enable freeswitchps -ef | grep freeswitchfreeswitch -ncfs_cli2.安装fusionpbx
cd /var/www/htmlgit clone https://github.com/powerpbx/fusionpbx.git3.安装apache
rpm -qa httpdyum install httpd -ychkconfig httpd onservice httpd startvi /etc/httpd/conf/httpd.conf ...service httpd restartsed -i s//(^SElinux=/).*//SELINUX=disabled/ /etc/selinux/config4.Apache config
usermod -a -G apache freeswitchsed -i "s/User apache/User freeswitch/" /etc/httpd/conf/httpd.confsed -i "s/Group apache/Group daemon/" /etc/httpd/conf/httpd.confsed -i :a;N;$!ba;s/AllowOverride None/AllowOverride All/2 /etc/httpd/conf/httpd.conf5.set permissions
chown -R freeswitch.daemon /etc/freeswitch /var/lib/freeswitch /var/log/freeswitch /usr/share/freeswitch /var/www/html/fusionpbxfind /etc/freeswitch -type d -exec chmod 770 {} /;find /var/lib/freeswitch -type d -exec chmod 770 {} /;find /var/log/freeswitch -type d -exec chmod 770 {} /;find /usr/share/freeswitch -type d -exec chmod 770 {} /;find /var/www/html/fusionpbx -type d -exec chmod 770 {} /;find /etc/freeswitch -type f -exec chmod 664 {} /;find /var/lib/freeswitch -type f -exec chmod 664 {} /;find /var/log/freeswitch -type f -exec chmod 664 {} /;find /usr/share/freeswitch -type f -exec chmod 664 {} /;find /var/www/html/fusionpbx -type f -exec chmod 664 {} /;6.Systemd config
vi /etc/systemd/system/freeswitch.service [Unit] Description=FreeSWITCH Wants=network-online.target After=syslog.target network.target network-online.target After=mariadb.service httpd.service [Service] Type=forking User=freeswitch WorkingDirectory=/run/freeswitch PIDFile=/run/freeswitch/freeswitch.pid EnvironmentFile=-/etc/sysconfig/freeswitch ExecStart=/usr/bin/freeswitch -ncwait -nonat $FREESWITCH_PARAMS ExecReload=/usr/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.targetvim /etc/tmpfiles.d/freeswitch.conf d /run/freeswitch 0750 freeswitch daemon -vi /etc/sysconfig/freeswitch ## Type: string ## Default: "" ## Config: "" ## ServiceRestart: freeswitch # # if not empty: parameters for freeswitch # FREESWITCH_PARAMS=""7.Enable services
systemctl daemon-reloadsystemctl enable httpdsystemctl enable freeswitchvi /etc/freeswitch/autoload_configs/event_socket.conf.xml <param name="listen-ip" value="127.0.0.1"/>8.安装php
yum install php php-develyum install php-pgsqlyum install php-pdoservice httpd restart9.关闭防火墙
systemctl stop firewalld.service10.重新启动
systemctl restart freeswitch新闻热点
疑难解答