首页 > linux > ubuntu > 4.linux安装配置Zookeeper及常用命令

4.linux安装配置Zookeeper及常用命令

1 linux下载zookeeper

wget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.5.2-alpha/zookeeper-3.5.2-alpha.tar.gz

2 linux解压缩zookeeper源码

tar -zxvf zookeeper-3.5.2-xxxx.tar.gz

3 打开conf目录

cd /zookeeper-3.5.2-alpha/conf

4 拷贝zoo_samle.cfg 为zoo.cfg

cp zoo_samle.cfg zoo.cfg

5 linux配置zookeeper环境变量

vim /etc/profile
export PATH=/download/zookeeper-3.5.2-alpha:$PATH
source /etc/profile

6 linux启动zookeeper

./zkServer.sh start

7 测试

通过telnet命令测试zookeeper默认端口2181是否开通:

telnet dashidan.com 2181
转载请保留原文链接.