Centos7Yum安装配置指定版本nginx及卸载Centos7Yum安装的nginx
一:Centos7Yum安装配置指定版本nginx
1、安装
rpm -ivh http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.16.1-1.el7_4.ngx.x86_64.rpm

2、启动 并验证
启动命令systemctl start nginx
验证命令curl http://127.0.0.1:80

3、nginx版本

4、nginx配置文件路径

5、nginx日志文件路径

6、设置开机启动
systemctl enable nginx

7、常用命令
// 服务状态
# systemctl status nginx
// 服务启动
# systemctl start nginx
// 服务停止
# systemctl stop nginx
// 服务重启
# systemctl restart nginx
二、卸载Centos7Yum安装的nginx
1、停止nginx软件
service nginx stop

2、删除nginx的自动启动

3、从源头删除nginx
rm -rf /usr/sbin/nginx
rm -rf /etc/nginx
rm -rf /etc/init.d/nginx

4、使用yum清理
yum remove nginx

5、查找删除一些残留文件
