just run 'brew install nginx'
$brew install nginx
mac:~ mac$ brew install nginx
==> Installing dependencies for nginx: openssl
==> Installing nginx dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2e_1.el_capitan
######################################################################## 100.0%
==> Pouring openssl-1.0.2e_1.el_capitan.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, 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.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2e_1: 465 files, 11.9M
==> Installing nginx
==> Downloading https://homebrew.bintray.com/bottles/nginx-1.8.0.el_capitan.bott
######################################################################## 100.0%
==> Pouring nginx-1.8.0.el_capitan.bottle.1.tar.gz
==> 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/.
To have launchd start nginx at login:
ln -sfv /usr/local/opt/nginx/*.plist ~/Library/LaunchAgents
Then to load nginx now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
Or, if you don't want/need launchctl, you can just run:
nginx
==> Summary
🍺 /usr/local/Cellar/nginx/1.8.0: 7 files, 940.1K
And you can change config file on this path
/usr/local/etc/nginx/nginx.conf
Good luck!
댓글 없음:
댓글 쓰기