【mac】安装配置 homebrew, Nginx

1.在浏览器中打开 https://raw.githubusercontent.com/Homebrew/install/master/install.sh ,很多文章还在用的脚本链接是老的了,官网已替换为这个。

2. 将此网页内容另存为install.sh

3. #命令行中进入此脚本(install.sh)所在位置,

执行以下内容chmod 755 install.sh

4. ./install.sh

5. brew info nginx

  • nginx: stable 1.19.10 (bottled), HEAD
    HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
    https://nginx.org/
    Not installed
    From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/nginx.rb
    License: BSD-2-Clause
    ==> Dependencies
    Required: openssl@1.1 ✘, pcre ✘
    ==> Options
    --HEAD
        Install HEAD version
    ==> Caveats
    Docroot is: /opt/homebrew/var/www
    
    The default port has been set in /opt/homebrew/etc/nginx/nginx.conf to 8080 so that
    nginx can run without sudo.
    
    nginx will load all files in /opt/homebrew/etc/nginx/servers/.
    
    To have launchd 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:
      nginx
    ==> Analytics
    install: 52,214 (30 days), 141,133 (90 days), 490,081 (365 days)
    install-on-request: 52,089 (30 days), 140,801 (90 days), 484,122 (365 days)
    build-error: 0 (30 days)

6. brew install nginx

7. open /opt/homebrew/etc/nginx/

 

posted @ 2021-04-28 18:06  耶梦加德  阅读(325)  评论(0编辑  收藏  举报