How can I stop mongodb from starting on system boot





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







18















I installed mongodb for learning purpose, the problem I am facing is that it starts on system boot and consume resources even if not being used. I want it to be removed from system boot, how can I do this?










share|improve this question























  • From how much resources are you talking about?

    – A.B.
    Sep 22 '15 at 13:03






  • 5





    Possible duplicate of How to enable or disable services?

    – Mostafa Ahangarha
    Mar 30 '16 at 16:34











  • If you are using a recent version of ubuntu, you probably need to follow the instructions for systemd on how to "disable" a service: askubuntu.com/questions/19320/… ; you can also "mask" a service if you want to completely disable the service. If you "disable" a service it will not automatically start at boot time. If you "mask" a service, it will not be able to be started and will be completely disabled.

    – mchid
    Jan 5 '17 at 20:14




















18















I installed mongodb for learning purpose, the problem I am facing is that it starts on system boot and consume resources even if not being used. I want it to be removed from system boot, how can I do this?










share|improve this question























  • From how much resources are you talking about?

    – A.B.
    Sep 22 '15 at 13:03






  • 5





    Possible duplicate of How to enable or disable services?

    – Mostafa Ahangarha
    Mar 30 '16 at 16:34











  • If you are using a recent version of ubuntu, you probably need to follow the instructions for systemd on how to "disable" a service: askubuntu.com/questions/19320/… ; you can also "mask" a service if you want to completely disable the service. If you "disable" a service it will not automatically start at boot time. If you "mask" a service, it will not be able to be started and will be completely disabled.

    – mchid
    Jan 5 '17 at 20:14
















18












18








18


1






I installed mongodb for learning purpose, the problem I am facing is that it starts on system boot and consume resources even if not being used. I want it to be removed from system boot, how can I do this?










share|improve this question














I installed mongodb for learning purpose, the problem I am facing is that it starts on system boot and consume resources even if not being used. I want it to be removed from system boot, how can I do this?







startup upstart autostart






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 22 '15 at 12:49









segmentationfaultersegmentationfaulter

257258




257258













  • From how much resources are you talking about?

    – A.B.
    Sep 22 '15 at 13:03






  • 5





    Possible duplicate of How to enable or disable services?

    – Mostafa Ahangarha
    Mar 30 '16 at 16:34











  • If you are using a recent version of ubuntu, you probably need to follow the instructions for systemd on how to "disable" a service: askubuntu.com/questions/19320/… ; you can also "mask" a service if you want to completely disable the service. If you "disable" a service it will not automatically start at boot time. If you "mask" a service, it will not be able to be started and will be completely disabled.

    – mchid
    Jan 5 '17 at 20:14





















  • From how much resources are you talking about?

    – A.B.
    Sep 22 '15 at 13:03






  • 5





    Possible duplicate of How to enable or disable services?

    – Mostafa Ahangarha
    Mar 30 '16 at 16:34











  • If you are using a recent version of ubuntu, you probably need to follow the instructions for systemd on how to "disable" a service: askubuntu.com/questions/19320/… ; you can also "mask" a service if you want to completely disable the service. If you "disable" a service it will not automatically start at boot time. If you "mask" a service, it will not be able to be started and will be completely disabled.

    – mchid
    Jan 5 '17 at 20:14



















From how much resources are you talking about?

– A.B.
Sep 22 '15 at 13:03





From how much resources are you talking about?

– A.B.
Sep 22 '15 at 13:03




5




5





Possible duplicate of How to enable or disable services?

– Mostafa Ahangarha
Mar 30 '16 at 16:34





Possible duplicate of How to enable or disable services?

– Mostafa Ahangarha
Mar 30 '16 at 16:34













If you are using a recent version of ubuntu, you probably need to follow the instructions for systemd on how to "disable" a service: askubuntu.com/questions/19320/… ; you can also "mask" a service if you want to completely disable the service. If you "disable" a service it will not automatically start at boot time. If you "mask" a service, it will not be able to be started and will be completely disabled.

– mchid
Jan 5 '17 at 20:14







If you are using a recent version of ubuntu, you probably need to follow the instructions for systemd on how to "disable" a service: askubuntu.com/questions/19320/… ; you can also "mask" a service if you want to completely disable the service. If you "disable" a service it will not automatically start at boot time. If you "mask" a service, it will not be able to be started and will be completely disabled.

– mchid
Jan 5 '17 at 20:14












3 Answers
3






active

oldest

votes


















13














I can't test it at the moment, but I think this should work



 sudo update-rc.d mongodb disable


If this is not enough try this



 sudo update-rc.d -f mongodb remove





share|improve this answer
























  • Yep, the first one worked to me :)

    – Samuel G. P.
    Apr 8 '16 at 12:18



















6














This is borrowed from this answer:



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





share|improve this answer


























  • As Robert indicated in his answer, this works but the file should be mongod.override (not mongodb)

    – Hector Correa
    Jan 28 '17 at 19:03



















4














@davelupt's reference is great. However I guess the command should be



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



since the file for MongoDB under /etc/init is mongod.conf.






share|improve this answer



















  • 1





    On 16.10 and 16.04, I'm showing /etc/init/mongodb.conf when I run either one of the following commands: dpkg -L mongodb-server | grep /etc/init/mongod or apt-file search /etc/init/mongod

    – mchid
    Jan 5 '17 at 20:30












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f677066%2fhow-can-i-stop-mongodb-from-starting-on-system-boot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









13














I can't test it at the moment, but I think this should work



 sudo update-rc.d mongodb disable


If this is not enough try this



 sudo update-rc.d -f mongodb remove





share|improve this answer
























  • Yep, the first one worked to me :)

    – Samuel G. P.
    Apr 8 '16 at 12:18
















13














I can't test it at the moment, but I think this should work



 sudo update-rc.d mongodb disable


If this is not enough try this



 sudo update-rc.d -f mongodb remove





share|improve this answer
























  • Yep, the first one worked to me :)

    – Samuel G. P.
    Apr 8 '16 at 12:18














13












13








13







I can't test it at the moment, but I think this should work



 sudo update-rc.d mongodb disable


If this is not enough try this



 sudo update-rc.d -f mongodb remove





share|improve this answer













I can't test it at the moment, but I think this should work



 sudo update-rc.d mongodb disable


If this is not enough try this



 sudo update-rc.d -f mongodb remove






share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 22 '15 at 15:26









SpinningTopSpinningTop

34914




34914













  • Yep, the first one worked to me :)

    – Samuel G. P.
    Apr 8 '16 at 12:18



















  • Yep, the first one worked to me :)

    – Samuel G. P.
    Apr 8 '16 at 12:18

















Yep, the first one worked to me :)

– Samuel G. P.
Apr 8 '16 at 12:18





Yep, the first one worked to me :)

– Samuel G. P.
Apr 8 '16 at 12:18













6














This is borrowed from this answer:



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





share|improve this answer


























  • As Robert indicated in his answer, this works but the file should be mongod.override (not mongodb)

    – Hector Correa
    Jan 28 '17 at 19:03
















6














This is borrowed from this answer:



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





share|improve this answer


























  • As Robert indicated in his answer, this works but the file should be mongod.override (not mongodb)

    – Hector Correa
    Jan 28 '17 at 19:03














6












6








6







This is borrowed from this answer:



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





share|improve this answer















This is borrowed from this answer:



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






share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 27 at 2:16









Zanna

51.4k13140243




51.4k13140243










answered Mar 30 '16 at 16:25









daveluptdavelupt

17518




17518













  • As Robert indicated in his answer, this works but the file should be mongod.override (not mongodb)

    – Hector Correa
    Jan 28 '17 at 19:03



















  • As Robert indicated in his answer, this works but the file should be mongod.override (not mongodb)

    – Hector Correa
    Jan 28 '17 at 19:03

















As Robert indicated in his answer, this works but the file should be mongod.override (not mongodb)

– Hector Correa
Jan 28 '17 at 19:03





As Robert indicated in his answer, this works but the file should be mongod.override (not mongodb)

– Hector Correa
Jan 28 '17 at 19:03











4














@davelupt's reference is great. However I guess the command should be



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



since the file for MongoDB under /etc/init is mongod.conf.






share|improve this answer



















  • 1





    On 16.10 and 16.04, I'm showing /etc/init/mongodb.conf when I run either one of the following commands: dpkg -L mongodb-server | grep /etc/init/mongod or apt-file search /etc/init/mongod

    – mchid
    Jan 5 '17 at 20:30
















4














@davelupt's reference is great. However I guess the command should be



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



since the file for MongoDB under /etc/init is mongod.conf.






share|improve this answer



















  • 1





    On 16.10 and 16.04, I'm showing /etc/init/mongodb.conf when I run either one of the following commands: dpkg -L mongodb-server | grep /etc/init/mongod or apt-file search /etc/init/mongod

    – mchid
    Jan 5 '17 at 20:30














4












4








4







@davelupt's reference is great. However I guess the command should be



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



since the file for MongoDB under /etc/init is mongod.conf.






share|improve this answer













@davelupt's reference is great. However I guess the command should be



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



since the file for MongoDB under /etc/init is mongod.conf.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 5 '17 at 3:04









RobertRobert

1412




1412








  • 1





    On 16.10 and 16.04, I'm showing /etc/init/mongodb.conf when I run either one of the following commands: dpkg -L mongodb-server | grep /etc/init/mongod or apt-file search /etc/init/mongod

    – mchid
    Jan 5 '17 at 20:30














  • 1





    On 16.10 and 16.04, I'm showing /etc/init/mongodb.conf when I run either one of the following commands: dpkg -L mongodb-server | grep /etc/init/mongod or apt-file search /etc/init/mongod

    – mchid
    Jan 5 '17 at 20:30








1




1





On 16.10 and 16.04, I'm showing /etc/init/mongodb.conf when I run either one of the following commands: dpkg -L mongodb-server | grep /etc/init/mongod or apt-file search /etc/init/mongod

– mchid
Jan 5 '17 at 20:30





On 16.10 and 16.04, I'm showing /etc/init/mongodb.conf when I run either one of the following commands: dpkg -L mongodb-server | grep /etc/init/mongod or apt-file search /etc/init/mongod

– mchid
Jan 5 '17 at 20:30


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f677066%2fhow-can-i-stop-mongodb-from-starting-on-system-boot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

數位音樂下載

格利澤436b

When can things happen in Etherscan, such as the picture below?