zoukankan      html  css  js  c++  java
  • CentOS7上设置FreeSwitch自启动

    程序安装在/usr/local/freeswitch目录,root用户。

    1、在目录/usr/lib/systemd/system下创建文件freeswitch.service,内容如下:

    [Unit]
    Description=FreeSWITCH
    After=syslog.target network.target
    After=postgresql.service postgresql-9.3.service postgresql-9.4.service mysqld.service httpd.service
    
    [Service]
    User=root
    EnvironmentFile=-/etc/sysconfig/freeswitch
    WorkingDirectory=/usr/local/freeswitch
    ExecStart=/usr/local/freeswitch/bin/freeswitch -nc -nf $FREESWITCH_PARAMS 
    ExecReload=/usr/bin/kill -HUP $MAINPID
    #ExecStop=/usr/local/freeswitch/bin/freeswitch -stop $FREESWITCH_PARAMS
    ExecStop=/bin/kill -9 $MAINPID
    
    
    [Install]
    WantedBy=multi-user.target


    2、在目录/etc/sysconfig下创建文件freeswitch,内容如下:

    ## Type:                string
    ## Default:             ""
    ## Config:              ""
    ## ServiceRestart:      freeswitch
    #
    # if not empty: parameters for freeswitch
    #
    FREESWITCH_PARAMS=""

    3、修改
    cd /usr/local/
    chown -R root:root freeswitch
    chmod -R g+w freeswitch

    4、启动
    开机启动:systemctl enable freeswitch.service
    启动服务:systemctl start freeswitch.service
    结束服务:systemctl stop freeswitch.service

  • 相关阅读:
    JAVA基础——编程练习(二)
    JAVA基础——面向对象三大特性:封装、继承、多态
    JVM内存
    50. Pow(x, n) (JAVA)
    47. Permutations II (JAVA)
    46. Permutations (JAVA)
    45. Jump Game II (JAVA)
    43. Multiply Strings (JAVA)
    42. Trapping Rain Water (JAVA)
    41. First Missing Positive (JAVA)
  • 原文地址:https://www.cnblogs.com/cash/p/13163664.html
Copyright © 2011-2022 走看看