1. Homebrew
1.1. 安装
国内推荐使用清华源: https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
1.1.1. Homebrew Cask
http://mirrors.ustc.edu.cn/help/homebrew-cask.git.html
1.2. 使用
brew list
brew services
brew services restart stunnel
brew services --help
# 安装软件
brew install name
# 桌面端软件
brew cask install name
# 联网搜索软件是否存在 brew 中
brew search name
# 更新软件
brew upgrade name
# 卸载软件
brew unistall name
# 重新安装软件
brew reinstall name
# 查看软件安装地址
brew info name
# 清理缓存
brew cleanup
# 查看建议, 例如升级等
brew doctor
1.3. 软件
1.3.1. nginx
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 restart nginx after an upgrade:
brew services restart nginx
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/nginx/bin/nginx -g daemon off;
1.3.2. stunnel
A bogus SSL server certificate has been installed to:
/opt/homebrew/etc/stunnel/stunnel.pem
This certificate will be used by default unless a config file says otherwise!
Stunnel will refuse to load the sample configuration file if left unedited.
In your stunnel configuration, specify a SSL certificate with
the "cert =" option for each service.
To use Stunnel with Homebrew services, make sure to set "foreground = yes" in
your Stunnel configuration.
To restart stunnel after an upgrade:
brew services restart stunnel
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/stunnel/bin/stunnel