1.添加nginx的源
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2.执行安装命令
yum install -y nginx
3.配置路径
/etc/nginx/
4.配置验证
nginx -t
5.启动
service nginx start
6.重载配置
nginx -s reload
7.开机自启动
systemctl enable nginx.service