官网下载的包都不好使啊,还是这个历史版本的下载吧。
archive.apache.org/dist/zookee…
下载3.4.9
wget http://archive.apache.org/dist/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz
没有wget的yum下一个,下了用不了的,提示已安装,但是用不了的,卸载了再装就好了。
yum install wget
yum remove wget
下载解压
tar -zxf zookeeper-3.4.9.tar.gz -C /opt/module/
进入解压好的目录,首先复制配置文件,默认是zoo.xml,所以把他提供的复制一份
cd /opt/module/conf/
cp zoo_sample.cfg zoo.cfg
然后是开启
./zkServer.sh start
也可以使用前台运行
./zkServer.sh start-foreground
检查是否运行好了。
./zkServer.sh status
正常将输出这个:
[root@iZ9qxqyeu3kf5oZ zookeeper-3.4.9]# ./bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /opt/module/zookeeper-3.4.9/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED