按下面步骤即可安装:
1.更新安装源
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2.安装nginx
yum -y install nginx
3.重启nginx
service nginx restart | reload | start | stop
4.设置开机启动
chkconfig nginx on
配置nginx
1.修改配置文件
vi /etc/nginx/conf.d/default.conf