简体   繁体   中英

Stopping postgresql from starting on ubuntu startup

Ubuntu 16.04.1 LTS I have tried:

sudo update-rc.d -f postgresql remove

and

sudo vim /etc/postgresql/9.5/main/start.conf

then i change the word "auto" to "disabled"

Then i reboot the computer, and when it starts, i login and do:

sudo service --status-all | grep postgresql

Which returns:

[ + ]  postgresql

So it is still starting when the server starts. What is left for me to do? I don't want this service running when the computer starts, only when i manually start it with:

sudo service postgresql start

Use systemctl command to manage postgresql service:

  1. stop service:

    systemctl stop postgresql

  2. start service:

    systemctl start postgresql

  3. show status of service:

    systemctl status postgresql

  4. disable service(not auto-start any more)

    systemctl disable postgresql

  5. enable service postgresql(auto-start)

    systemctl enable postgresql

Ok. it's fixed thanks to Koen De Groote.

I did:

echo manual | sudo tee /etc/init/postgresql.override

and

sudo systemctl disable postgresql.service

and

sudo systemctl disable postgresql

....I don't know which one of them did it, but its not starting any more... Thank you...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM