Skip to content

Instantly share code, notes, and snippets.

@ergin
Created July 12, 2018 19:30
Show Gist options
  • Save ergin/756ce815bcd19f0a69f02c14bcf5fd79 to your computer and use it in GitHub Desktop.
Save ergin/756ce815bcd19f0a69f02c14bcf5fd79 to your computer and use it in GitHub Desktop.
Apache ZooKeeper systemd service file
[Unit]
Description=Apache ZooKeeper Centralized Service
Requires=network.target
After=network.target
[Service]
Type=forking
Restart=always
RestartSec=0s
ExecStart=/opt/zookeeper/bin/zkServer.sh start
ExecStop=/opt/zookeeper/bin/zkServer.sh stop
ExecReload=/opt/zookeeper/bin/zkServer.sh restart
[Install]
WantedBy=multi-user.target
# nano /etc/systemd/system/zookeeper.service
# systemctl daemon-reload
# systemctl enable zookeeper.service
# systemctl start zookeeper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment