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、查找删除一些残留文件
相关推荐
HanksWang 2020-11-10
nginxs 2020-11-14
Guanjs0 2020-11-13
小木兮子 2020-11-11
yserver 2020-11-11
ssihc0 2020-11-11
windle 2020-11-10
liuchen0 2020-11-10
Freshairx 2020-11-10
ccschan 2020-11-10
liwf 2020-11-10
Guanjs0 2020-11-09
AderStep 2020-11-09
zrtlin 2020-11-09
mqfcu 2020-11-10
windle 2020-10-29