Zookeeper-Zookeeper安装与配置

zookeeper安装与配置

下载

最新版的下载地址

历史版本下载地址

配置

解压下载的包

1
sudo tar -zxf apache-zookeeper-3.5.5-bin.tar.gz -C /usr/local/share

创建软连接

1
sudo ln -s /usr/local/share/apache-zookeeper-3.5.5-bin /usr/local/share/zookeeper

配置环境变量

1
sudo vim /etc/profile
1
export ZOOKEEPER_HOME=/usr/local/share/zookeeper
1
source /etc/profile

zoo.cfg

1
2
cd $ZOOKEEPER_HOME
sudo vim conf/zoo.cfg
1
2
3
4
ticketTime=2000
clientPort=2181
dataDir=/usr/local/share/zookeeper/data
dataLogDir=/usr/local/share/zookeeper/logs

启动 zkServer

1
2
cd $ZOOKEEPER_HOME
sudo ./bin/zkServer.sh start

测试

1
./bin/zkCli.sh -server 127.0.0.1:2181

一些资源

Zookeeper Getting Started

0%
隐藏