How to disable self-starting programs in Homestead

WBOY
Release: 2016-08-08 09:06:52
Original
1084 people have browsed it

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>
Copy after login
Copy after login
  • 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>
    Copy after login
    Copy after login
    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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!