1. 安装
1.1 github 获取源码
git clone https://github.com/ossrs/srs.git
1.2 编译
1.2.1 关闭防火墙和 selinux
先关闭防火墙,防止有时候启动没有问题,但是就是看不了。
Centos6.x 下关闭防火墙和 selinux 的命令:
# disable the firewall
sudo /etc/init.d/iptables stop
sudo /sbin/chkconfig iptables off
selinux也需要disable,运行命令getenforce,若不是Disabled,执行下面的步骤:
编辑配置文件:sudo vi /etc/sysconfig/selinux
把SELINUX的值改为disabled:SELINUX=disabled
重启系统:sudo init 6
Ubuntu 下关闭防火墙的命令为:
ufw disable
Ubuntu 下默认没有安装 selinux,需要手动安装。
1.2.2 编译
./configure && make
指定配置文件,即可启动SRS:
./objs/srs -c conf/srs.conf
2. 部署
2.1 RTMP 部署实例
假设服务器的IP是:192.168.1.170
2.1.1 编写SRS配置文件
SRS 只需要配置 vhost 和帧听端口,以及支持的最大连接数&#