1、安装
rpm -ivh http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.14.2-1.el7_4.ngx.x86_64.rpm
2、启动
# systemctl start nginx
// 验证是否启动成功
# curl http://127.0.0.1:80
// 正常会返回html代码
3、设置开机启动服务
systemctl enable nginx
4、常用命令
// 服务状态
# systemctl status nginx
// 服务启动
# systemctl start nginx
// 服务停止
# systemctl stop nginx
// 服务重启
# systemctl restart nginx