前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >使用nginx搭建简单的流媒体服务器(rtmp)

使用nginx搭建简单的流媒体服务器(rtmp)

作者头像
liuzhen007
发布2021-06-29 15:54:04
1.4K0
发布2021-06-29 15:54:04
举报
文章被收录于专栏:流媒体音视频流媒体音视频
代码语言:javascript
复制
==> Installing nginx-full from denji/nginx
==> Installing dependencies for denji/nginx/nginx-full: pcre, openssl and rtmp-nginx-module
==> Installing denji/nginx/nginx-full dependency: pcre
==> Downloading homebrew.bintray.com/bottles/pcr…
######################################################################## 100.0%
==> Pouring pcre-8.42.high_sierra.bottle.tar.gz
?  /usr/local/Cellar/pcre/8.42: 204 files, 5.3MB
==> Installing denji/nginx/nginx-full dependency: openssl
==> Downloading homebrew.bintray.com/bottles/ope….
######################################################################## 100.0%
==> Pouring openssl-1.0.2p.high_sierra.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
For compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
For pkg-config to find openssl you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
==> Summary
?  /usr/local/Cellar/openssl/1.0.2p: 1,793 files, 12.3MB
==> Installing denji/nginx/nginx-full dependency: rtmp-nginx-module
==> Downloading github.com/sergey-drya…
==> Downloading from codeload.github.com/sergey-drya…
######################################################################## 100.0%
==> Downloading github.com/sergey-drya…
######################################################################## 100.0%
==> Patching
==> Applying v1.1.7.10...504b9ee.diff
patching file .gitignore
patching file README.md
patching file config
patching file dash/ngx_rtmp_dash_module.c
patching file doc/README.md
patching file doc/directives.md
patching file hls/ngx_rtmp_hls_module.c
patching file hls/ngx_rtmp_mpegts.c
patching file hls/ngx_rtmp_mpegts.h
patching file hls/ngx_rtmp_mpegts_crc.c
patching file hls/ngx_rtmp_mpegts_crc.h
patching file ngx_rtmp.c
patching file ngx_rtmp_access_module.c
patching file ngx_rtmp_amf.c
patching file ngx_rtmp_auto_push_module.c
patching file ngx_rtmp_cmd_module.h
patching file ngx_rtmp_codec_module.c
patching file ngx_rtmp_core_module.c
patching file ngx_rtmp_eval.c
patching file ngx_rtmp_exec_module.c
patching file ngx_rtmp_handshake.c
patching file ngx_rtmp_init.c
patching file ngx_rtmp_live_module.c
patching file ngx_rtmp_live_module.h
patching file ngx_rtmp_netcall_module.c
patching file ngx_rtmp_notify_module.c
patching file ngx_rtmp_record_module.c
patching file ngx_rtmp_record_module.h
patching file ngx_rtmp_shared.c
patching file ngx_rtmp_version.h
?  /usr/local/Cellar/rtmp-nginx-module/1.1.7.11-dev_3: 94 files, 1.4MB, built in 21 seconds
==> Installing denji/nginx/nginx-full --with-rtmp-module
==> Downloading nginx.org/download/ng…
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/nginx-full/1.15.6 --with-http_ssl_mod
==> make install
==> Caveats
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
nginx will load all files in /usr/local/etc/nginx/servers/.
Tips
Run port 80:
sudochownroot:wheel/usr/local/opt/nginx?full/bin/nginxsudo chown root:wheel /usr/local/opt/nginx-full/bin/nginxsudochownroot:wheel/usr/local/opt/nginx?full/bin/nginx sudo chmod u+s /usr/local/opt/nginx-full/bin/nginx
Reload config:
nginx?sreloadReopenLogfile:nginx -s reload Reopen Logfile:nginx?sreloadReopenLogfile: nginx -s reopen
Stop process:
nginx?sstopWaitingonexitprocessnginx -s stop Waiting on exit processnginx?sstopWaitingonexitprocess nginx -s quit
To have launchd start denji/nginx/nginx-full now and restart at login:
brew services start denji/nginx/nginx-full
Or, if you don't want/need a background service you can just run:
nginx
==> Summary
?  /usr/local/Cellar/nginx-full/1.15.6: 8 files, 1.2MB, built in 1 minute
==> Caveats
==> openssl
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:PATH"′>> /.bashprofileForcompilerstofindopensslyoumayneedtoset:exportLDFLAGS="?L/usr/local/opt/openssl/lib"exportCPPFLAGS="?I/usr/local/opt/openssl/include"Forpkg?configtofindopensslyoumayneedtoset:exportPKGCONFIGPATH="/usr/local/opt/openssl/lib/pkgconfig"==>nginx?fullDocrootis:/usr/local/var/wwwThedefaultporthasbeensetin/usr/local/etc/nginx/nginx.confto8080sothatnginxcanrunwithoutsudo.nginxwillloadallfilesin/usr/local/etc/nginx/servers/.TipsRunport80:PATH"' >> ~/.bash_profile For compilers to find openssl you may need to set:  export LDFLAGS="-L/usr/local/opt/openssl/lib"  export CPPFLAGS="-I/usr/local/opt/openssl/include" For pkg-config to find openssl you may need to set:  export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig" ==> nginx-full Docroot is: /usr/local/var/www The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that nginx can run without sudo. nginx will load all files in /usr/local/etc/nginx/servers/. Tips Run port 80:  PATH"′>> /.bashprofileForcompilerstofindopensslyoumayneedtoset:exportLDFLAGS="?L/usr/local/opt/openssl/lib"exportCPPFLAGS="?I/usr/local/opt/openssl/include"Forpkg?configtofindopensslyoumayneedtoset:exportPKGCONFIGPATH="/usr/local/opt/openssl/lib/pkgconfig"==>nginx?fullDocrootis:/usr/local/var/wwwThedefaultporthasbeensetin/usr/local/etc/nginx/nginx.confto8080sothatnginxcanrunwithoutsudo.nginxwillloadallfilesin/usr/local/etc/nginx/servers/.TipsRunport80: sudo chown root:wheel /usr/local/opt/nginx-full/bin/nginx
sudochmodu+s/usr/local/opt/nginx?full/bin/nginxReloadconfig:sudo chmod u+s /usr/local/opt/nginx-full/bin/nginx Reload config:sudochmodu+s/usr/local/opt/nginx?full/bin/nginxReloadconfig: nginx -s reload
Reopen Logfile:
nginx?sreopenStopprocess:nginx -s reopen Stop process:nginx?sreopenStopprocess: nginx -s stop
Waiting on exit process
$ nginx -s quit
To have launchd start denji/nginx/nginx-full now and restart at login:
brew services start denji/nginx/nginx-full
Or, if you don't want/need a background service you can just run:
nginx
本文参与?腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2021-05-12,如有侵权请联系?cloudcommunity@tencent.com 删除

本文分享自 玩转音视频 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与?腾讯云自媒体分享计划? ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
http://www.vxiaotou.com