checkconfig Ubuntu alternative?

Soldato
Joined
18 May 2010
Posts
22,941
Location
London
So in the Centos/Redhat world you can use checkconfig --level 35 etc.. to add services at differnet run levels.

I am trying to do something similar with Apache running on Ubuntu.

According to what I can find online the answer is something like:

update-rc.d apache2 default

or


update-rc.d apache2 enable 2345

But none of this works. If I restart the server the Apache services is not auto started on boot up.

Any ideas?

---

This doesn't seem to work either....

sudo systemctl enable apache2
 
Last edited:
I'm running Ubuntu 16.04.1 LTS.

Very strange on my home VM when I start the server the apache2 service does not start automatically.

andrew@ubuntu:~$ systemctl status apache2
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; static; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)

I have ran systemctl enable apache2 yesterday.

Would be nice to get to the bottom of this as I have lots of Linux interviews coming up and if I can explain why a service cant start n start up... :(

---

I just ran systemctl enable apache2 again and rebooted and can confirm the process remains dead.
 
Last edited:
Back
Top Bottom