Centos7 卸载 Nginx 并重新安装 Nginx

1)  卸载nginx

[root@locahost /]# yum remove nginx

 

2) 查看nginx是否还存在

[root@localhost /]# which nginx

 

 

3)重新安装 Nginx

[root@localhost /]# yum install nginx

 

4)启动 Nginx

[root@localhost /]# yum start nginx

 

5)设置自动开机启动 Nginx

[root@localhost /]# yum enable nginx

 

转载于:https://www.cnblogs.com/ryanzheng/p/11263031.html

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在CentOS 7上卸载Nginx,您可以按照以下步骤进行操作: 1. 首先,您可以使用以下命令检查Nginx是否正在运行: ``` ps aux | grep nginx ``` 2. 进入Nginx的sbin目录: ``` cd /data/nginx/sbin ``` 3. 停止Nginx的运行: ``` ./nginx -s stop ``` 4. 使用以下命令查找与Nginx相关的文件夹: ``` find / -name nginx ``` 5. 删除与Nginx相关的文件: ``` rm -rf /data/nginx* ``` 6. 再次使用以下命令查找Nginx相关文件: ``` find / -name nginx* ``` 7. 最后,使用以下命令卸载Nginx的依赖: ``` yum remove nginx ``` 这样就完成了在CentOS 7上卸载Nginx的过程。请注意,这些步骤假设您已经安装了Nginx并且知道其安装位置。如果您的情况有所不同,请相应地调整命令。 #### 引用[.reference_title] - *1* *2* [Centos7安装、卸载nginx及配置,配置成系统服务(一步到位)](https://blog.csdn.net/qq_45978154/article/details/128714981)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [安装、卸载nginx(基于Centos7)](https://blog.csdn.net/weixin_53168725/article/details/127156305)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值