brew 如何安装 nginx

2024-09-28 17:08:43

要使用 Homebrew 安装 nginx,请打开终端并运行以下命令:

brew install nginx

安装完成后,你可以通过以下命令启动 nginx:

brew services start nginx

或者手动启动:

nginx

要停止 nginx,可以使用:

brew services stop nginx

或者如果你已经手动启动了它,可以使用:

nginx -s stop

要查看 nginx 是否正在运行,可以使用:

curl -I localhost

如果安装成功,你将看到 nginx 的相关响应头信息。

相关推荐
nvm安装node,报Get "https://nodejs.org/dist/latest/SHASUMS256.txt" dial tcp 104.20.23.46:443i/o timeoutnpm install时,下载失败,报:network request to https://registry.nlark.com/yallist/download/yallist-2.1.2.tgz?Linux 平台中如何安装 nvm、git 等node-schedule 设置定时任务