Friday, 8 May 2015

How to stop mongod [or any other daemon] from automatically starting.

How to stop mongod[mongo daemon] from automatically starting.


TL;DR
1-Install  sysv-rc-conf ->apt-get install sysv-rc-conf
2-Run sysv-rc-conf [run as root if no root privileges] ->sysv-rc-conf 

When i look up running process in htop or in conky ,i can see mongod running .mongod which is the daemon for running mongo database.i don't always use  mongodb except for projects.So i didn't want mongod to run in background when i don't need it.There are many methods of doing this.The easiest way i found ways to use program call sysv-rc-conf.Its available in debian repository and can be installed using this command apt-get install sysv-rc-conf or using synaptic package manger.
Next go to terminal type sysv-rc-conf[use su or sudo if current user has no root privileges].Then stop mongod at all run-levels.As you can see sysv-rc-conf can be used to manage all kinds of program related daemon like docker etc..
Make sure you don't stop system critical daemons.Tested on debian 8 but all other linux distros should be able to replicate.

:)


Before stopping mongod



No comments:

Post a Comment