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;
}
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
add a comment |
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
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
add a comment |
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
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
startup upstart autostart
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
add a comment |
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
add a comment |
3 Answers
3
active
oldest
votes
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
Yep, the first one worked to me :)
– Samuel G. P.
Apr 8 '16 at 12:18
add a comment |
This is borrowed from this answer:
echo manual | sudo tee /etc/init/mongod.override
As Robert indicated in his answer, this works but the file should bemongod.override
(not mongodb)
– Hector Correa
Jan 28 '17 at 19:03
add a comment |
@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
.
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
orapt-file search /etc/init/mongod
– mchid
Jan 5 '17 at 20:30
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
Yep, the first one worked to me :)
– Samuel G. P.
Apr 8 '16 at 12:18
add a comment |
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
Yep, the first one worked to me :)
– Samuel G. P.
Apr 8 '16 at 12:18
add a comment |
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
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
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
add a comment |
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
add a comment |
This is borrowed from this answer:
echo manual | sudo tee /etc/init/mongod.override
As Robert indicated in his answer, this works but the file should bemongod.override
(not mongodb)
– Hector Correa
Jan 28 '17 at 19:03
add a comment |
This is borrowed from this answer:
echo manual | sudo tee /etc/init/mongod.override
As Robert indicated in his answer, this works but the file should bemongod.override
(not mongodb)
– Hector Correa
Jan 28 '17 at 19:03
add a comment |
This is borrowed from this answer:
echo manual | sudo tee /etc/init/mongod.override
This is borrowed from this answer:
echo manual | sudo tee /etc/init/mongod.override
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 bemongod.override
(not mongodb)
– Hector Correa
Jan 28 '17 at 19:03
add a comment |
As Robert indicated in his answer, this works but the file should bemongod.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
add a comment |
@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
.
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
orapt-file search /etc/init/mongod
– mchid
Jan 5 '17 at 20:30
add a comment |
@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
.
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
orapt-file search /etc/init/mongod
– mchid
Jan 5 '17 at 20:30
add a comment |
@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
.
@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
.
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
orapt-file search /etc/init/mongod
– mchid
Jan 5 '17 at 20:30
add a comment |
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
orapt-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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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