Created
August 20, 2012 19:52
-
-
Save emaxerrno/3407216 to your computer and use it in GitHub Desktop.
Zookeeper on ubuntu and monitoring
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "assumes java 7 is instlaled openjdk versio" | |
#pre dependencies | |
sudo apt-get install git-core pkg-config libtool automake make g++ connect-proxy unzip python | |
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 | |
#install zeromq | |
git clone git clone git://github.com/zeromq/libzmq.git | |
pushd libzmq | |
./autogen.sh | |
./configure # add other options here | |
make | |
make check | |
sudo make install | |
sudo ldconfig | |
popd | |
#install the java bindings | |
git clone http://github.com/zeromq/jzmq | |
pushd jzmq | |
./autogen.sh | |
./configure | |
make | |
sudo make install | |
popd | |
#now install zookeeper | |
sudo apt-get install zookeeper #installs 3.3.5 | |
export PATH=/usr/share/zookeeper/bin:$PATH | |
echo "Don't forget to modify /etc/zookeper/conf/myid" | |
echo "Don't forget to add /usr/share/zookeeper/bin to your PATH var permanently" | |
# needs this for zookpr as that is a failfast deamon :( | |
# supervisord is a deamon that watches your processes and restarts them if needed | |
sudo apt-get install supervisor python-pip python-dev | |
sudo pip install python-handler-socket | |
#add at the end of | |
sudo cat >> /etc/supervisor/supervisord.conf <<DELIMITER | |
[program:zookeeper] | |
command=/usr/share/zookeeper/bin/zkServer.sh start-foreground | |
process_name=%(program_name)s | |
autostart=true | |
autorestart=true | |
stopsignal=KILL | |
DELIMITER | |
tail -f /var/log/supervisor/supervisord.log & | |
sudo /etc/init.d/supervisor start | |
echo "If you got this far without errors, you owe alex a beer." |
There is one too many "git clone"s on line 10.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You spelled "zookeeper" incorrectly here:
echo "Don't forget to modify /etc/zookeper/conf/myid"