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:

WordPress.com Logo

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s