linux安装srs4.0并实现开机自启

linux安装srs4.0并实现开机自启,第1张

linux安装srs4.0并实现开机自启

1.下载srs4.0压缩包并解压
2.指定安装目录 进入trunk目录
./configure --prefix=/usr/local/software/srs/srs4.0
执行安装: make
3.配置conf/srs.conf文件这个根据具体业务流程 *** 作
4.将trunk/etc/init.d/srs 复制到 trunk下面
5.修改srs配置文件

ROOT="/usr/local/software/srs/srs-server-4.0.177/trunk/"
APP="/usr/local/software/srs/srs-server-4.0.177/trunk/objs/srs"
CONFIG="/usr/local/software/srs/srs-server-4.0.177/trunk/conf/srs.conf"
DEFAULT_PID_FILE='/usr/local/software/srs/srs-server-4.0.177/trunk/objs/srs.pid'
DEFAULT_LOG_FILE='/usr/local/software/srs/srs-server-4.0.177/trunk/objs/srs.log'

6.cd /lib/systemd/system
7.vim srs.service

#!/bin/sh
[Unit]
Description=The SRS Media Stream Cluster yupan
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/software/srs/srs-server-4.0.177/trunk/srs start
ExecReload=/usr/local/software/srs/srs-server-4.0.177/trunk/srs reload
ExecStop=/usr/local/software/srs/srs-server-4.0.177/trunk/srs stop

[Install]
WantedBy=multi-user.target

8.systemctl daemon-reload
9.systemctl enable srs.service

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4002942.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-10-22
下一篇 2022-10-22

发表评论

登录后才能评论

评论列表(0条)

保存