1. nginxnginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server.,今天小编就来聊一聊关于nginx应该安装在centos的哪里?接下来我们就一起去研究一下吧!

nginx应该安装在centos的哪里(mac下操作nginx安装)

nginx应该安装在centos的哪里

1. nginx

nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server.

从niginx基本介绍上看到Other HTTP server features中有一项:

FLV and MP4 streaming;

可知nginx也支持流媒体.

2. brew

brew又叫Homebrew,是Mac中的一款软件包管理工具,通过brew可以很方便的在Mac中安装软件或者是卸载软件.

一般Mac电脑会默认安装有brew.

常用指令如下:

brew 搜索软件

brew search nginx

brew 安装软件

brew install nginx

brew 卸载软件

brew uninstall nginx

brew 升级

sudo brew update

查看安装信息(经常用到, 比如查看安装目录等)

sudo brew info nginx

查看已经安装的软件

brew list

brew list 运行结果

3. brew安装nginx

安装nginx

可以用brew很方便地安装nginx.

sudo brew install nginx

启动nginx服务

sudo brew services start nginx

利用http://localhost:8080进行访问, 如果出现如下界面,说明启动成功.

查看nginx版本

nginx -v

关闭nginx服务

sudo brew services stop nginx

另外几个比较方便的指令

重新加载nginx

nginx -s reload

停止nginx

nginx -s stop

,