源码安装SRS4
Ubuntu20安装好SRS后,(源码安装)
注意:在trunk目录SRS
./objs/srs -c conf/srs.conf
以上为启动srs命令,-c 为指定配置文件,
查看SRS进程
ps aux | grep srs
查看端口:
netstat -ano | grep 1935
检查SRS是否成功启动,可以打开 http://localhost:8080/ ,或者执行命令:
# 查看SRS的状态
./etc/init.d/srs status# 或者看SRS的日志
tail -n 30 -f ./objs/srs.log
例如,下面的命令显示SRS正在运行:
MB0:trunk $ ./etc/init.d/srs status
SRS(pid 90408) is running. [ OK ]MB0:trunk $ tail -n 30 -f ./objs/srs.log
[2021-08-13 10:30:36.634][Trace][90408][12c97232] Hybrid cpu=0.00%,0MB, cid=1,1, timer=61,0,0, clock=0,22,25,0,0,0,0,1,0
关闭防火墙,放开端口
打开:http://192.168.1.127:8080/
打开控制台:
http://192.168.1.127:8080/console/ng_index.html
http://192.168.1.127:1985/console/ng_index.html
播放器:
http://192.168.1.127:8080/players/srs_player.html