Install Deamon (Zookeeper) but don't automatically start it
I've installed zookeeper and zookeeperd on 18.04 directly from the APT sources.
That works fine, but it gets started automatically. How can I prevent this?
Stopping the daemon afterward is possible, but i has a change that it will create any data with the example config.
We need this for immutable VM images, so i don't want to have any artifacts in the image.
I am sure this is not Zookeeper specific but I was not able to find anything.
apt 18.04 systemd
add a comment |
I've installed zookeeper and zookeeperd on 18.04 directly from the APT sources.
That works fine, but it gets started automatically. How can I prevent this?
Stopping the daemon afterward is possible, but i has a change that it will create any data with the example config.
We need this for immutable VM images, so i don't want to have any artifacts in the image.
I am sure this is not Zookeeper specific but I was not able to find anything.
apt 18.04 systemd
add a comment |
I've installed zookeeper and zookeeperd on 18.04 directly from the APT sources.
That works fine, but it gets started automatically. How can I prevent this?
Stopping the daemon afterward is possible, but i has a change that it will create any data with the example config.
We need this for immutable VM images, so i don't want to have any artifacts in the image.
I am sure this is not Zookeeper specific but I was not able to find anything.
apt 18.04 systemd
I've installed zookeeper and zookeeperd on 18.04 directly from the APT sources.
That works fine, but it gets started automatically. How can I prevent this?
Stopping the daemon afterward is possible, but i has a change that it will create any data with the example config.
We need this for immutable VM images, so i don't want to have any artifacts in the image.
I am sure this is not Zookeeper specific but I was not able to find anything.
apt 18.04 systemd
apt 18.04 systemd
edited Jan 8 at 12:16
Mark Eisenblätter
asked Jan 8 at 6:46
Mark EisenblätterMark Eisenblätter
85
85
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can simply do:
sudo systemctl disable zoo
If you’d like to prevent daemons from starting after installing a package, just toss a few lines into /usr/sbin/policy-rc.d
:
sudo -i
cat > /usr/sbin/policy-rc.d << EOF
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
exit 101
EOF
exit
Now, install any packages that you need and the daemons will remain stopped until you start them (or reboot the server). Be sure to remove the policy file you added once you’re done installing your packages.
Yes but, at this time the Service has already started and their is maye some data written, from the wrong example config.
– Mark Eisenblätter
Jan 8 at 10:03
You wont to install zookeeper and not start it directly after installing?
– Mirosław Mówiński
Jan 8 at 10:07
Yes, we use Immutable images on VM basis and try to create the image first.
– Mark Eisenblätter
Jan 8 at 10:23
@MarkEisenblätter i've edited main reply :) please check if it works for you, if yes please upvote my comment :D
– Mirosław Mówiński
Jan 8 at 11:40
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%2f1107891%2finstall-deamon-zookeeper-but-dont-automatically-start-it%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can simply do:
sudo systemctl disable zoo
If you’d like to prevent daemons from starting after installing a package, just toss a few lines into /usr/sbin/policy-rc.d
:
sudo -i
cat > /usr/sbin/policy-rc.d << EOF
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
exit 101
EOF
exit
Now, install any packages that you need and the daemons will remain stopped until you start them (or reboot the server). Be sure to remove the policy file you added once you’re done installing your packages.
Yes but, at this time the Service has already started and their is maye some data written, from the wrong example config.
– Mark Eisenblätter
Jan 8 at 10:03
You wont to install zookeeper and not start it directly after installing?
– Mirosław Mówiński
Jan 8 at 10:07
Yes, we use Immutable images on VM basis and try to create the image first.
– Mark Eisenblätter
Jan 8 at 10:23
@MarkEisenblätter i've edited main reply :) please check if it works for you, if yes please upvote my comment :D
– Mirosław Mówiński
Jan 8 at 11:40
add a comment |
You can simply do:
sudo systemctl disable zoo
If you’d like to prevent daemons from starting after installing a package, just toss a few lines into /usr/sbin/policy-rc.d
:
sudo -i
cat > /usr/sbin/policy-rc.d << EOF
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
exit 101
EOF
exit
Now, install any packages that you need and the daemons will remain stopped until you start them (or reboot the server). Be sure to remove the policy file you added once you’re done installing your packages.
Yes but, at this time the Service has already started and their is maye some data written, from the wrong example config.
– Mark Eisenblätter
Jan 8 at 10:03
You wont to install zookeeper and not start it directly after installing?
– Mirosław Mówiński
Jan 8 at 10:07
Yes, we use Immutable images on VM basis and try to create the image first.
– Mark Eisenblätter
Jan 8 at 10:23
@MarkEisenblätter i've edited main reply :) please check if it works for you, if yes please upvote my comment :D
– Mirosław Mówiński
Jan 8 at 11:40
add a comment |
You can simply do:
sudo systemctl disable zoo
If you’d like to prevent daemons from starting after installing a package, just toss a few lines into /usr/sbin/policy-rc.d
:
sudo -i
cat > /usr/sbin/policy-rc.d << EOF
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
exit 101
EOF
exit
Now, install any packages that you need and the daemons will remain stopped until you start them (or reboot the server). Be sure to remove the policy file you added once you’re done installing your packages.
You can simply do:
sudo systemctl disable zoo
If you’d like to prevent daemons from starting after installing a package, just toss a few lines into /usr/sbin/policy-rc.d
:
sudo -i
cat > /usr/sbin/policy-rc.d << EOF
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
exit 101
EOF
exit
Now, install any packages that you need and the daemons will remain stopped until you start them (or reboot the server). Be sure to remove the policy file you added once you’re done installing your packages.
edited Jan 8 at 11:44
Zanna
50.6k13134241
50.6k13134241
answered Jan 8 at 9:49
Mirosław MówińskiMirosław Mówiński
664
664
Yes but, at this time the Service has already started and their is maye some data written, from the wrong example config.
– Mark Eisenblätter
Jan 8 at 10:03
You wont to install zookeeper and not start it directly after installing?
– Mirosław Mówiński
Jan 8 at 10:07
Yes, we use Immutable images on VM basis and try to create the image first.
– Mark Eisenblätter
Jan 8 at 10:23
@MarkEisenblätter i've edited main reply :) please check if it works for you, if yes please upvote my comment :D
– Mirosław Mówiński
Jan 8 at 11:40
add a comment |
Yes but, at this time the Service has already started and their is maye some data written, from the wrong example config.
– Mark Eisenblätter
Jan 8 at 10:03
You wont to install zookeeper and not start it directly after installing?
– Mirosław Mówiński
Jan 8 at 10:07
Yes, we use Immutable images on VM basis and try to create the image first.
– Mark Eisenblätter
Jan 8 at 10:23
@MarkEisenblätter i've edited main reply :) please check if it works for you, if yes please upvote my comment :D
– Mirosław Mówiński
Jan 8 at 11:40
Yes but, at this time the Service has already started and their is maye some data written, from the wrong example config.
– Mark Eisenblätter
Jan 8 at 10:03
Yes but, at this time the Service has already started and their is maye some data written, from the wrong example config.
– Mark Eisenblätter
Jan 8 at 10:03
You wont to install zookeeper and not start it directly after installing?
– Mirosław Mówiński
Jan 8 at 10:07
You wont to install zookeeper and not start it directly after installing?
– Mirosław Mówiński
Jan 8 at 10:07
Yes, we use Immutable images on VM basis and try to create the image first.
– Mark Eisenblätter
Jan 8 at 10:23
Yes, we use Immutable images on VM basis and try to create the image first.
– Mark Eisenblätter
Jan 8 at 10:23
@MarkEisenblätter i've edited main reply :) please check if it works for you, if yes please upvote my comment :D
– Mirosław Mówiński
Jan 8 at 11:40
@MarkEisenblätter i've edited main reply :) please check if it works for you, if yes please upvote my comment :D
– Mirosław Mówiński
Jan 8 at 11:40
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%2f1107891%2finstall-deamon-zookeeper-but-dont-automatically-start-it%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