zookeeper 安装

解压

tar zxf zookeeper-3.4.6.tar.gz
drwxr-xr-x 10 1000 1000      4096 Feb 20  2014 zookeeper-3.4.6
-rwxr-xr-x  1 root root  17699306 Apr  8 23:15 zookeeper-3.4.6.tar.gz

进入解压后的目录cd zookeeper-3.4.6

total 1564
drwxr-xr-x  2 1000 1000    4096 Feb 20  2014 bin
-rw-rw-r--  1 1000 1000   82446 Feb 20  2014 build.xml
-rw-rw-r--  1 1000 1000   80776 Feb 20  2014 CHANGES.txt
drwxr-xr-x  2 1000 1000    4096 Feb 20  2014 conf
drwxr-xr-x 10 1000 1000    4096 Feb 20  2014 contrib
drwxr-xr-x  2 1000 1000    4096 Feb 20  2014 dist-maven
drwxr-xr-x  6 1000 1000    4096 Feb 20  2014 docs
-rw-rw-r--  1 1000 1000    1953 Feb 20  2014 ivysettings.xml
-rw-rw-r--  1 1000 1000    3375 Feb 20  2014 ivy.xml
drwxr-xr-x  4 1000 1000    4096 Feb 20  2014 lib
-rw-rw-r--  1 1000 1000   11358 Feb 20  2014 LICENSE.txt
-rw-rw-r--  1 1000 1000     170 Feb 20  2014 NOTICE.txt
-rw-rw-r--  1 1000 1000    1770 Feb 20  2014 README_packaging.txt
-rw-rw-r--  1 1000 1000    1585 Feb 20  2014 README.txt
drwxr-xr-x  5 1000 1000    4096 Feb 20  2014 recipes
drwxr-xr-x  8 1000 1000    4096 Feb 20  2014 src
-rw-rw-r--  1 1000 1000 1340305 Feb 20  2014 zookeeper-3.4.6.jar
-rw-rw-r--  1 1000 1000     836 Feb 20  2014 zookeeper-3.4.6.jar.asc
-rw-rw-r--  1 1000 1000      33 Feb 20  2014 zookeeper-3.4.6.jar.md5
-rw-rw-r--  1 1000 1000      41 Feb 20  2014 zookeeper-3.4.6.jar.sha1

创建data目录

[root@VM_0_7_centos zookeeper-3.4.6]# mkdir data

进入conf目录

[root@VM_0_7_centos zookeeper-3.4.6]# cd conf
[root@VM_0_7_centos conf]# ll
total 12
-rw-rw-r-- 1 1000 1000  535 Feb 20  2014 configuration.xsl
-rw-rw-r-- 1 1000 1000 2161 Feb 20  2014 log4j.properties
-rw-rw-r-- 1 1000 1000  922 Feb 20  2014 zoo_sample.cfg
mv zoo_sample.cfg zoo.cfg
vim zoo.cfg

将dataDir=/tmp/zookeeper修改为刚刚创建的data目录的路径

# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/developer/setup/zookeeper-3.4.6/data

进入bin目录,启动zookeeper

./zkServer.sh start

查看启动状态

./zkServer.sh status
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值