在服务器上装了两个网页服务器nginx, apache,想要关闭nginx的开机自启。用到了以下命令:
systemctl disable nginx.service 关闭开机自启
systemctl enable nginx.service 开启开机自启
systemctl status nginx.service 查看状态
systemctl restart nginx.service 重启服务
systemctl list-units --type=service 查看所有服务
网上有介绍update-rc.d -f nginx remove可以来关闭自启,发现在ubuntu 18.04下面不行。
网友评论