根据this guide,我设置为Lighty,并且我没有真正使用安装的lighttpd守护进程(这是驻留在/ etc中的那个守护进程/init.d/lighttpd)。除了在工作时,我不想让网络服务器一直运行。我想在需要时只调用lighttpd -Df lighttpd.conf。如何在Ubuntu启动时禁用lighttpd守护进程
如何禁用此功能?
根据this guide,我设置为Lighty,并且我没有真正使用安装的lighttpd守护进程(这是驻留在/ etc中的那个守护进程/init.d/lighttpd)。除了在工作时,我不想让网络服务器一直运行。我想在需要时只调用lighttpd -Df lighttpd.conf。如何在Ubuntu启动时禁用lighttpd守护进程
如何禁用此功能?
您可以使用以下命令禁用启动时的lighttpd。
sudo update-rc.d -f lighttpd remove
这是一个脚本,将删除的lighttpd从以下位置启动脚本:
/etc/rc0.d
/etc/rc1.d
/etc/rc2.d
/etc/rc3.d
/etc/rc4.d
/etc/rc5.d
/etc/rc6.d
/etc/rcS.d
希望帮助
我们与systemd:
prompt$ sudo systemctl disable lighttpd
你也可能要
prompt$ sudo systemctl stop lighttpd
as disable不会停止任何正在运行的服务器。
systemd几乎回落到SysV的处理和运行一个脚本,做什么奥利弗在他的回答中提到的(据我所知)
Synchronizing state of lighttpd.service with SysV init with
/lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable lighttpd
最终评估
$CHROOT /usr/sbin/update-rc.d "$NAME" defaults
$CHROOT /usr/sbin/update-rc.d "$NAME" disable
(在Fedora盒在看时)