1查看是否安装了zookeeper:rpm -qa | grep zookeeper;如果安装了那么继续使用或者卸载:yum remove zookeeper_name
2下载zookeeper:wget http://www-eu.apache.org/dist/zookeeper/stable/zzookeeper-3.4.14.tar.gz
3安装zooleeper:tar -zxvf zookeeper-3.4.14.tar.gz
4进入zookeeper文件夹中的conf:cd zookeeper-3.4.14/conf/;进入conf文件
5复制一份副本,重命名文件名为zoo.cfg:cp zoo_sample.cfg zoo.cfg
6修改conf文件:vi zoo.cfg
mkdir /usr/local/java/zookeeper/data
mkdir /usr/local/java/zookeeper/log
创建zookeeper的数据和日志存放位置
mkdir /usr/local/java/zookeeper/data
mkdir /usr/local/java/zookeeper/log
修改内容为
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/usr/local/zookeeper/data
dataLogDir=/usr/local/zookeeper/log
# the port at which the clients will connect
clientPort=2181