linux安装zookeeper3.7.1()

下载zookeeper3.7.1

mkdir /home/jeanerk/zookeeper
cd /home/jeanerk/zookeeper
wget –no-check-certificate https://mirrors.bfsu.edu.cn/apache/zookeeper/zookeeper-3.7.1/apache-zookeeper-3.7.1-bin.tar.gz

mkdir /home/jeanerk/zookeeper
cd /home/jeanerk/zookeeper
wget –no-check-certificate https://mirrors.bfsu.edu.cn/apache/zookeeper/zookeeper-3.7.1/apache-zookeeper-3.7.1-bin.tar.gz

安装zookeeper

tar -xvzf apache-zookeeper-3.7.1-bin.tar.gz
cd apache-zookeeper-3.7.1-bin/conf
cp zoo_sample.cfg zoo.cfg

tar -xvzf apache-zookeeper-3.7.1-bin.tar.gz
cd apache-zookeeper-3.7.1-bin/conf
cp zoo_sample.cfg zoo.cfg

配置zoo.cfg

mkdir -p /home/zookeeper/3.7.1/zkdata
vi zoo.cfg

mkdir -p /home/zookeeper/3.7.1/zkdata
vi zoo.cfg

修改dataDir为刚才创建的目录 /home/zookeeper/3.7.1/zkdata

启动zookeeper

cd ../bin
./zkServer.sh start

cd ../bin
./zkServer.sh start

测试是否安装成功

./zkCli.sh

./zkCli.sh

如果终端出现以下内容,则安装成功。

[zk: localhost:2181(CONNECTED) 1]

[zk: localhost:2181(CONNECTED) 1]

————————

下载zookeeper3.7.1

mkdir /home/jeanerk/zookeeper
cd /home/jeanerk/zookeeper
wget –no-check-certificate https://mirrors.bfsu.edu.cn/apache/zookeeper/zookeeper-3.7.1/apache-zookeeper-3.7.1-bin.tar.gz

mkdir /home/jeanerk/zookeeper
cd /home/jeanerk/zookeeper
wget –no-check-certificate https://mirrors.bfsu.edu.cn/apache/zookeeper/zookeeper-3.7.1/apache-zookeeper-3.7.1-bin.tar.gz

安装zookeeper

tar -xvzf apache-zookeeper-3.7.1-bin.tar.gz
cd apache-zookeeper-3.7.1-bin/conf
cp zoo_sample.cfg zoo.cfg

tar -xvzf apache-zookeeper-3.7.1-bin.tar.gz
cd apache-zookeeper-3.7.1-bin/conf
cp zoo_sample.cfg zoo.cfg

配置zoo.cfg

mkdir -p /home/zookeeper/3.7.1/zkdata
vi zoo.cfg

mkdir -p /home/zookeeper/3.7.1/zkdata
vi zoo.cfg

修改dataDir为刚才创建的目录 /home/zookeeper/3.7.1/zkdata

启动zookeeper

cd ../bin
./zkServer.sh start

cd ../bin
./zkServer.sh start

测试是否安装成功

./zkCli.sh

./zkCli.sh

如果终端出现以下内容,则安装成功。

[zk: localhost:2181(CONNECTED) 1]

[zk: localhost:2181(CONNECTED) 1]