Home >Backend Development >PHP Tutorial >How to disable self-starting programs in Homestead

How to disable self-starting programs in Homestead

WBOY
WBOYOriginal
2016-08-08 09:06:521140browse

For example, I don’t use postgresql in daily development, so I want to close it and prevent it from starting automatically

  • Installed

    sysv-rc-conf and removed all x from all run levels

<code> postgresql  [ ]     [ ]     [ ]     [ ]     [ ]     [ ]     [ ]     [ ]</code>
  • Used

    sudo update-rc.d -f postgresql remove

I used the above two methods and found that the service is still alive after reboot.

This is my first time using the homestead environment, and I still haven’t figured out some things.

Ubuntu16.04

Reply content:

For example, I don’t use postgresql

in daily development, so I want to close it and prevent it from starting automatically

    Installed
  • sysv-rc-conf

    and removed all x from all run levels

    <code> postgresql  [ ]     [ ]     [ ]     [ ]     [ ]     [ ]     [ ]     [ ]</code>
    Used
  • sudo update-rc.d -f postgresql remove

  • I used the above two methods and found that the service is still alive after reboot.

This is my first time using the homestead environment, and I still haven’t figured out some things.

Ubuntu16.04

It turns out that 16.04 uses

systemctl

as system management. It seems that update-rc.d is useless Using

sudo systemctrl disable postgresql

can

Using
rcconf

you can check whether a service is enabled sudo systemctl is-enabled postgresql
Check the self-starting service at boot: ls /etc/systemd/system/multi-user.target.wants

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn