1.安装源
rpm -ivh http://nginx.org/packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm
2.安装 (-y 的意思是自动yes)
yum install nginx -y
3.查找安装到哪里了
whereis nginx
一般都是在 /etc/nginx下面
4.常用命令
检查配置文件是否正确 nginx -t
启动 systemctl start nginx
查看状态 systemctl status nginx
设置开机启动 systemctl enable nginx
重启服务 systemctl reload nginx
停止 systemctl stop nginx