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

原创
2021/05/12 21:41
阅读数 90

今天换种发文形式,据说抗审美疲劳!



==> 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==> CaveatsA CA file has been bootstrapped using certificates from the SystemRootskeychain. To add additional certificates (e.g. the certificates added inthe System keychain), place .pem files in/usr/local/etc/openssl/certsand run/usr/local/opt/openssl/bin/c_rehashopenssl 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_profileFor 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.diffpatching file .gitignorepatching file README.mdpatching file configpatching file dash/ngx_rtmp_dash_module.cpatching file doc/README.mdpatching file doc/directives.mdpatching file hls/ngx_rtmp_hls_module.cpatching file hls/ngx_rtmp_mpegts.cpatching file hls/ngx_rtmp_mpegts.hpatching file hls/ngx_rtmp_mpegts_crc.cpatching file hls/ngx_rtmp_mpegts_crc.hpatching file ngx_rtmp.cpatching file ngx_rtmp_access_module.cpatching file ngx_rtmp_amf.cpatching file ngx_rtmp_auto_push_module.cpatching file ngx_rtmp_cmd_module.hpatching file ngx_rtmp_codec_module.cpatching file ngx_rtmp_core_module.cpatching file ngx_rtmp_eval.cpatching file ngx_rtmp_exec_module.cpatching file ngx_rtmp_handshake.cpatching file ngx_rtmp_init.cpatching file ngx_rtmp_live_module.cpatching file ngx_rtmp_live_module.hpatching file ngx_rtmp_netcall_module.cpatching file ngx_rtmp_notify_module.cpatching file ngx_rtmp_record_module.cpatching file ngx_rtmp_record_module.hpatching file ngx_rtmp_shared.cpatching 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==> CaveatsDocroot is: /usr/local/var/wwwThe default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so thatnginx can run without sudo.nginx will load all files in /usr/local/etc/nginx/servers/.TipsRun 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/nginxReload config:nginx−sreloadReopenLogfile:nginx -s reload Reopen Logfile:nginx−sreloadReopenLogfile: nginx -s reopenStop process:nginx−sstopWaitingonexitprocessnginx -s stop Waiting on exit processnginx−sstopWaitingonexitprocess nginx -s quitTo have launchd start denji/nginx/nginx-full now and restart at login:brew services start denji/nginx/nginx-fullOr, 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==> opensslA CA file has been bootstrapped using certificates from the SystemRootskeychain. To add additional certificates (e.g. the certificates added inthe System keychain), place .pem files in/usr/local/etc/openssl/certsand run/usr/local/opt/openssl/bin/c_rehashopenssl 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/nginxsudochmodu+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 reloadReopen Logfile:nginx−sreopenStopprocess:nginx -s reopen Stop process:nginx−sreopenStopprocess: nginx -s stopWaiting on exit process$ nginx -s quitTo have launchd start denji/nginx/nginx-full now and restart at login:brew services start denji/nginx/nginx-fullOr, if you don't want/need a background service you can just run:nginx


本文分享自微信公众号 - 玩转音视频(gh_5da216074f34)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
0
分享
返回顶部
顶部