标签:tar keep 下载 data log dir color lin nbsp
环境:
Linux 7.x
zookeeper-3.4.6.tar.gz
操作系统中,将其安装到 /u03/app/ 目录中;
1. 下载
# curl -L -O http://apache.fayea.com/zookeeper/stable/zookeeper-3.4.6.tar.gz
2. 解压 & 重名令 & Copy
# tar -zxf zookeeper-3.4.6.tar.gz -C /u03/app
# mv zookeeper-3.4.6.tar.gz zookeeper01
# cp -a zookeeper01 zookeeper02
# cp -a zookeeper01 zookeeper03
3. 创建日志目录 & 数据目录
# cd /u03/app/
# mkdir ./zookeeper01/datas
# mkdir ./zookeeper01/logs
# mkdir ./zookeeper02/datas
# mkdir ./zookeeper02/logs
# mkdir ./zookeeper03/datas
# mkdir ./zookeeper03/logs
4. 修改配置文件,此处以zookeeper01列出配置,zookeeper02、03 的配置操作和01的配置操作步骤一样(注意:修改02、03的时候,clientPort 这个参数的端口需要进行修改.)
我这边的端口配置:01的 clientPort=2181 , 02的clientPort=2182 ,03的clientPort=2183
# cd zookeeper01/conf
# cp zoo_sample.cfg zoo.cfg
# vim zoo.cfg (该配置文件的内容修改项见截图标红部分.)
5. 创建主机标识ID
# cd /u03/app
# echo "1" > ./zookeeper01/datas/myid
# echo "2" > ./zookeeper02/datas/myid
# echo "3" > ./zookeeper03/datas/myid
6. 启动 zookeeper
标签:tar keep 下载 data log dir color lin nbsp
原文地址:https://www.cnblogs.com/Charles-Yuan/p/10990039.html