mac安装nginx

发布时间 2023-12-06 09:26:57作者: 沧海一滴

 

~ % brew install nginx
==> Downloading https://formulae.brew.sh/api/formula.jws.json
#=#=-#     #
#=O#-  #     #
-#O=-#   #      #

########################################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
########################################################################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nginx/manifests/1.25.3
Already downloaded: /Users/cheng.tang/Library/Caches/Homebrew/downloads/6ff6885c1f394ca9099a079cf19c71f7d8a5a60a1fbb2146623520351db161d7--nginx-1.25.3.bottle_manifest.json
==> Fetching nginx
==> Downloading https://ghcr.io/v2/homebrew/core/nginx/blobs/sha256:e0e4362ed0777f481f6e6ceb44ac5c65b0d1aeb092a5686e14c329ec692950a1
########################################################################################################################################## 100.0%
==> Pouring nginx--1.25.3.monterey.bottle.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 start nginx now and restart at login:
  brew services start nginx
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/nginx/bin/nginx -g daemon\ off\;
==> Summary
?  /usr/local/Cellar/nginx/1.25.3: 26 files, 2.5MB
==> Running `brew cleanup nginx`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
~ %

 

 

 

 

~ % brew install nginx
==> Downloading https://formulae.brew.sh/api/formula.jws.json
#=O#-  #     #
Warning: nginx 1.25.3 is already installed and up-to-date.
To reinstall 1.25.3, run:
  brew reinstall nginx
~ %