安装nginx
准备工作
1、安装homeBrew
安装nginx
1、brew tap denji/nginx
2、brew install nginx-full --with-rtmp-module
3、查看
vlc播放器下载地址:
1、https://get.videolan.org/vlc/3.0.3/macosx/vlc-3.0.3.dmg
2、http://www.pc6.com/mac/112121.html
参考文章:
https://www.jianshu.com/p/5ee84e403ea8
- 安装成功的输出
➜ MiaowShow brew install nginx-full --with-rtmp-module
Updating Homebrew...
==> Installing nginx-full from denji/nginx
==> Installing dependencies for denji/nginx/nginx-full: pcre, openssl, rtmp-nginx-module
==> Installing denji/nginx/nginx-full dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.42.high_sierra.bottle.tar.gz
######################################################################## 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 https://homebrew.bintray.com/bottles/openssl-1.0.2o_2.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2o_2.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
This formula 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 this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
==> Summary
/usr/local/Cellar/openssl/1.0.2o_2: 1,792 files, 12.3MB
==> Installing denji/nginx/nginx-full dependency: rtmp-nginx-module
==> Downloading https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/v1.1.7.10.tar.gz
==> Downloading from https://codeload.github.com/sergey-dryabzhinsky/nginx-rtmp-module/tar.gz/v1.1.7.10
######################################################################## 100.0%
==> Downloading https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/compare/v1.1.7.10...d25c56f.diff
######################################################################## 100.0%
==> Patching
==> Applying v1.1.7.10...d25c56f.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_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_exec_module.c
patching file ngx_rtmp_handshake.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_2: 94 files, 1.4MB, built in 15 seconds
==> Installing denji/nginx/nginx-full --with-rtmp-module
==> Downloading https://nginx.org/download/nginx-1.12.2.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/nginx-full/1.12.2 --with-http_ssl_module --with-pcre --with-ipv6 --sbin-path=/usr/local/Cellar/nginx-full/1.12.2/bin/nginx
==> 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:
$ sudo chown root:wheel /usr/local/opt/nginx-full/bin/nginx
$ sudo chmod u+s /usr/local/opt/nginx-full/bin/nginx
Reload config:
$ nginx -s reload
Reopen Logfile:
$ nginx -s reopen
Stop process:
$ 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
==> Summary
/usr/local/Cellar/nginx-full/1.12.2: 8 files, 1.2MB, built in 49 seconds
==> 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
This formula 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 this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
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:
$ sudo chown root:wheel /usr/local/opt/nginx-full/bin/nginx
$ sudo chmod u+s /usr/local/opt/nginx-full/bin/nginx
Reload config:
$ nginx -s reload
Reopen Logfile:
$ nginx -s reopen
Stop process:
$ 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