Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
215
rated 0 times [  215] [ 0]  / answers: 1 / hits: 282755  / 2 Years ago, sun, october 2, 2022, 4:54:05

How do I stop Apache2 from automatically starting on boot? I can't seem to find an option that disables the automatic start-up when I turn on the machine.


More From » apache2

 Answers
5

On old,pre systemd distributions under /etc/init.d/ you will find all the init scripts for different boot up services, like apache2, networking, etc.


Depending on which runlevel the computer starts in, different services are started.
So from the /etc/init.d/ folder each "service" is linked to one/many/no run level folders named from rc0.d to rc6.d.


To keep things simple there is a tool for removing/adding these links, hence removing or adding scripts to and from start up.


To disable apache2 simply type:


sudo update-rc.d apache2 disable

This disables apache2 at startup but is not removed so it can be enabled again. To remove the apache2 startup scripts do the following:


To remove apache2 simply type:


sudo update-rc.d -f  apache2 remove

###Doing this will cause all runlevel folders that are linked to apache2 to be removed.


[#36448] Monday, October 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
inaterested

Total Points: 500
Total Questions: 104
Total Answers: 92

Location: Virgin Islands (U.S.)
Member since Fri, May 7, 2021
3 Years ago
;