安装
1.yum 安装FreeSWITCH
yum -y update
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release
yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*
systemctl enable freeswitch
ps -ef | grep freeswitch
freeswitch -nc
fs_cli
2.安装fusionpbx
cd /var/www/html
git clone https://github.com/powerpbx/fusionpbx.git
3.安装apache
rpm -qa httpd
yum install httpd -y
chkconfig httpd on
service httpd start
vi /etc/httpd/conf/httpd.conf
...
service httpd restart
sed -i s/\(^SELINUX=\).*/\SELINUX=disabled/ /etc/selinux/config
4.Apache config
usermod -a -G apache freeswitch
sed -i "s/User apache/User freeswitch/" /etc/httpd/conf/httpd.conf
sed -i "s/Group apache/Group daemon/" /etc/httpd/conf/httpd.conf
sed -i :a;N;$!ba;s/AllowOverride None/AllowOverride All/2 /etc/httpd/conf/httpd.conf
5.set permissions
chown -R freeswitch.daemon /etc/freeswitch /var/lib/freeswitch /var/log/freeswitch /usr/share/freeswitch /var/www/html/fusionpbx
find /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.target
vim /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-reload
systemctl enable httpd
systemctl enable freeswitch
vi /etc/freeswitch/autoload_configs/event_socket.conf.xml
<param name="listen-ip" value="127.0.0.1"/>
8.安装php
yum install php php-devel
yum install php-pgsql
yum install php-pdo
service httpd restart
9.关闭防火墙
systemctl stop firewalld.service
10.重新启动
systemctl restart freeswitch