5

I'm using Linux Mint 18 XFCE and installed Apache, MySQL and PHP packages to make local development.

Apache and MySQL services are always active and start from the beginning.

How can I disable those service to do not start at the beginning? The idea is that whenever I want to work locally I'll start both services using something like:

sudo service apache2 start && sudo service mysql start
  • 1
    Remove them from init.d / systemd – 123 Oct 7 '16 at 13:36
  • I see no reason to downvote. – Archemar Oct 7 '16 at 14:09
6

You should disable them using either systemctl (if you're using systemd) or update-rc.d:

systemctl disable apache2 mysql

or

update-rc.d apache2 disable
update-rc.d mysql disable
  • 1
    It worked using systemctl. – juankvillegas Oct 7 '16 at 14:09
2

This may depend on your init system. Try one of these:

chkconfig apache2 off
systemctl disable apache2
insserv -r apache2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.