Support #890
Updated by Daniel Curtis over 7 years ago
This is a guide for setting up Zookeeper on FreeBSD 10. h2. Prepare the Environment * Make sure the system is up to date: <pre> pkg update && pkg upgrade </pre> h2. Install Zookeeper * Install zookeeper: <pre> pkg install zookeeper </pre> * Set the machine id: <pre> echo 1 > /var/db/zookeeper/myid chown -R zookeeper:zookeeper /var/db/zookeeper </pre> * Create a config from the sample config: <pre> cp /usr/local/etc/zookeeper/zoo_sample.cfg /usr/local/etc/zookeeper/zoo.cfg </pre> * Edit the zookeeper config: <pre> vi /usr/local/etc/zookeeper/zoo.cfg </pre> #* And modify the config accordingly: <pre> # The number of milliseconds of each tick #tickTime=2000 <pre> tickTime=2000 # The number of ticks that the initial # synchronization phase can take #initLimit=10 initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement #syncLimit=5 syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=/var/db/zookeeper # the port at which the clients will connect clientPort=2181 #clientPortAddress=192.168.1.100 clientPortAddress=192.168.1.100 # specify all zookeeper servers #server.1=192.168.1.101:2888:3888 server.1=192.168.1.101:2888:3888 #server.2=192.168.1.102:2888:3888 server.2=192.168.1.102:2888:3888 #server.3=192.168.1.103:2888:3888 server.3=192.168.1.103:2888:3888 </pre> * Start and enable zookeeper at boot: <pre> echo 'zookeeper_enable="YES"' >> /etc/rc.conf service zookeeper start </pre> h2. Resources * https://github.com/btccom/btcpool/blob/master/docs/INSTALL-ZooKeeper.md