有没有办法让Apache和MySQL在启动时不自动运行?
目前,每当我启动我的计算机时,它们会自动启动并在后台运行。
我正在使用Ubuntu 12.04。
sudo update-rc.d -f apache2 disable
update-rc.d
禁用它。
echo manual | sudo tee /etc/init/mysql.override
/etc/init.d
目录下的所有系统服务,可以使用update-rc.d
命令来禁用它们,例如:update-rc.d -f apache2 remove
update-rc.d apache2 defaults
service apache2 start
和service apache2 stop
手动启动和停止。update-rc.d -f apache2 remove
update-rc.d -f mysql remove
see: http://www.aboutlinux.info/2006/04/enabling-and-disabling-services-during_01.html
/etc/init
目录下具有.conf
文件(如mysql)的服务的自动启动的最简洁方法是以root身份运行以下命令:echo "manual" >> /etc/init/[service_name].override
。 - el.atomosudo mv /etc/init/cups.conf /etc/cups.conf.disabled
。这样做可以更容易地看到哪些服务被禁用了。关于是否可以删除打印机支持(cups)的问题。 - Gerard Rocheupdate-rc.d
吗? - Ehtesh Choudhury