Skip to content
On this page

介绍

Nginx(发音同 engine x)是一款轻量级的 Web 服务器 / 反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个 BSD-like 协议下发行,可以在 UNIX、GNU/Linux、BSD、Mac OS X、Solaris,以及 Microsoft Windows 等操作系统中运行。

安装

shell
# Centos7
$ yum install nginx -y # 安装nginx

常用命令

shell
$ sudo systemctl enable nginx # 设置开机启动 
$ sudo service nginx start    # 启动 nginx 服务
$ sudo service nginx stop     # 停止 nginx 服务
$ sudo service nginx restart  # 重启 nginx 服务
$ sudo service nginx reload   # 重新加载配置,一般是在修改过 nginx 配置文件时使用。