欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

*切换自启动设置

最编程 2024-05-05 16:40:07
...

设置freeswitch自启动

本文描述在CentOS7系统上设置freeswitch的自启动。程序安装在/usr/local/目录,用户是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

[Install]
WantedBy=multi-user.target

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

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

3.修改freeswitch文件的用户组及读写权限

cd /usr/local/
chown -R root:root freeswitch
chmod -R g+w freeswitch

4.启动自启动配置

systemctl enable freeswitch.service
systemctl start freeswitch.service

5.打开fs-cil的方式

fs_cil -H 192.168.0.126 -P 8021 -p ClueCon

推荐阅读