How to stop services from running in Ubuntu or how to stop mongo from autostart?

I wanted to stop the mongod service running on system boot in Ubuntu. This service is starting the mongodb database.

To do that I used the following two methods:
1. sudo update-rc.d -f mongodb remove
2. Open /etc/init/ folder and comment the following lines in the mongo.conf file:

start on runlevel [2345]
stop on runlevel [06]

This will stop the service from running on start up.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s