nginx 命令

nginx命令
# 设置开机启动
systemctl enable nginx

# 取消开机自启动
#systemctl disable nginx

# 查看服务当前状态
systemctl status nginx

# 启动nginx服务
systemctl start nginx

# 停止nginx服务
systemctl stop nginx

# 重启nginx服务
systemctl restart nginx

#卸载nginx

#sudo apt-get purge nginx

sudo apt-get remove nginx

 rm -rf /etc/nginx/
   rm -rf /usr/sbin/nginx
   rm /usr/share/man/man1/nginx.1.gz
   apt-get remove nginx*

# 删除除了配置文件以外的所有文件。
sudo apt-get remove nginx nginx-common
# 删除所有与nginx有关的东西,包括配置文件。
sudo apt-get purge nginx nginx-common
# 在上面命令结束后执行,主要是删除与Nginx有关的且不再被使用的依赖包。
sudo apt-get autoremove
# 删除两个主要的包。
sudo apt-get remove nginx-full nginx-common

————————————————
版权声明:本文为CSDN博主「WongKyunban」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_40763897/article/details/90722050


————————————————
版权声明:本文为CSDN博主「GW_Cheng」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/frankcheng5143/article/details/105227949

posted @ 2021-03-26 20:01  阳光依旧是我  阅读(159)  评论(0)    收藏  举报