902.安装FreeSWITCH

安装

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

来源张永光的博客

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值