I have installed Zookeeper using sudo apt-get install zookeeper on an Ubuntu server 14.04. I am having trouble understanding how to configure Zookeeper to start automatically, on boot. Also, I can manually start it successfully only with root priviledges.
I have looked at the documentation from the official page and it seems the solution is to make sure the zkServer.sh or something similar is run at start-up. I have been searching on how to execute scripts on start-up on Ubuntu, and found a few approaches: using Upstart, using System V, Cron jobs and even found a Python utility a kind soul shared for watching processes and restarting them when they crash. Given I am a beginner in Linux programming and spent way too much time working on Windows (where this kind of situation it's pretty straight forward to solve!), all seem a bit complicated and not sure which one is the best?
Any help will be much appreciated. Thank you.
To start the ZooKeeper server on a Linux system, use the Zookeeper/zookeeper/bin/zkServer.sh restart command from your Watson Explorer installation directory. On Microsoft Windows systems, use the Zookeeper\zookeeper\bin\zkServer. cmd command.
There's a separate package providing ZooKeeper init scripts:
apt-get install zookeeperd
Which will automatically start ZooKeeper. You can manage it with:
service zookeeper # {start|stop|status|restart|force-reload}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With