Ubuntu 系统下搭建 SRS 流媒体服务器

2019-03-31  本文已影响0人  valentizx

这个安装 SRS 服务器的过程,笔者是在 root 身份下进行的。
刚安装好的 Ubuntu 系统的 root 身份是没有密码的,没有密码就不能登录,所以首先要先给 root 设置密码:
sudo passwd,键入两次密码设置成功。
然后执行 su root 转换 root 身份。

然后安装 Git:
执行 apt install git

正式安装

  1. 执行 git clone https://github.com/ossrs/srs [该过程很漫长]
  2. 执行 cd srs/trunk
  3. 执行 ./configure && make
  4. 启动服务器则执行 ./objs/srs -c conf/srs.conf

遇到的问题

若在上节步骤 3 中的时候报下面的错误信息

patching file Makefile
cc -I. -DHTTP_PARSER_STRICT=1  -Wall -Wextra -Werror -O0 -g  -c http_parser.c
http_parser.c: In function ‘http_parser_parse_url’:
http_parser.c:2093:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         found_at = 1;
         ~~~~~~~~~^~~
http_parser.c:2096:7: note: here
       case s_req_server:
       ^~~~
cc1: all warnings being treated as errors
Makefile:40: recipe for target 'http_parser.o' failed
make: *** [http_parser.o] Error 1
build http-parser-2.1 failed, ret=2

该错误将在 SRS3 版本后解决,2 版本则需要开发者自行处理,处理流程在下。

步骤:

上一篇下一篇

猜你喜欢

热点阅读