ZooKeeper的安装

来源:互联网 发布:轰炸机软件 编辑:程序博客网 时间:2024/06/08 04:50

1.下载zookeeper

首先在apache官网上下载zookeeper安装包,这里下载的是zookeeper-3.5.2-alpha版本

2.配置zoo.cfg文件

在conf文件夹下,copy文件zoo_sample.cfg,并重新命名zoo.cfg。并修改里面的配置参数如下:
# The number of milliseconds of each ticktickTime=2000# The number of ticks that the initial # synchronization phase can takeinitLimit=10# The number of ticks that can pass between # sending a request and getting an acknowledgementsyncLimit=5# the directory where the snapshot is stored.# do not use /tmp for storage, /tmp here is just # example sakes.dataDir=/usr/local/software/zookeeper-3.5.1-alpha/data# the port at which the clients will connectclientPort=2181# the maximum number of client connections.# increase this if you need to handle more clients#maxClientCnxns=60## Be sure to read the maintenance section of the # administrator guide before turning on autopurge.## http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance## The number of snapshots to retain in dataDir#autopurge.snapRetainCount=3# Purge task interval in hours# Set to "0" to disable auto purge feature#autopurge.purgeInterval=1

3.配置zookeeper的环境变量

# Setting Zookeeperexport ZOOKEEPER_HOME=/usr/local/software/zookeeper-3.5.2-alphaexport PATH=${PATH}:${ZOOKEEPER_HOME}/binexport ZOO_LOG_DIR=${ZOOKEEPER_HOME}/log

4.启动zookeeper服务

5.查看进程


1 0
原创粉丝点击