[https://www.cnblogs.com/qingyunzong/p/8619184.html](https://www.cnblogs.com/qingyunzong/p/8619184.html)
#### 下载
```
cd ~/soft/
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.5.5/apache-zookeeper-3.5.5-bin.tar.gz
```
#### 解压
```
tar -zxvf apache-zookeeper-3.5.5.tar.gz
mv apache-zookeeper-3.5.5 zookeeper
```
#### 配置环境变量
```
vi ~/.bash_profile
```
```
# zookeeper
export ZOOKEEPER_HOME=/home/bigdata/soft/zookeeper
export PATH=$PATH:$ZOOKEEPER_HOME/bin
```
```
source ~/.bash_profile
```
#### 配置
```
vim $ZOOKEEPER_HOME/conf/zoo.cfg
```
```
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/home/bigdata/data/zookeeper
# the port at which the clients will connect
clientPort=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
dataLogDir=/home/bigdata/log/zookeeper
server.1=bd00:2888:3888
server.2=bd01:2888:3888
server.3=bd02:2888:3888
```
```
mkdir -p /home/bigdata/data/zookeeper
mkdir -p /home/bigdata/log/zookeeper
cd /home/bigdata/data/zookeeper
echo 1 > myid
```
#### 启动
```
zkServer.sh start
```
#### 查看集群状态,主从信息
```
zkServer.sh status
```
- 前言
- 虚拟机
- 前言
- 入门指南
- 集群规划
- 常用网址
- Hadoop集群常用端口
- 安装
- HA 环境安装教程
- 创建用户
- 设置SSH无密码登录
- MySQL安装
- 安装java
- 安装zookeeper
- hadoop 安装
- Hadoop HA 安装
- hadoop详细维护命令
- 集群性能测试
- 启动
- hadoop使用案例
- 安装hbase
- hive
- server2
- HA+联邦集群安装
- 常用
- 常用知识点
- HDFS
- HDFS 架构
- MapReduce
- MapReduce 教程
- HBase使用手册
- 简介
- HBase入门
- 安装HBase
- HBase管理页面
- 和HBase交互
- HBase Shell快速入门
- HBase数据模型
- HBase Schema设计
- HBase架构
- HBase安全
- HBase Shell命令
- HBase JSON配置使用说明
- HBase API使用说明
- HBase API运行教程
- HBase SQL基础
- HIVE
- 附录
- 各种数据库
- 操作系统教程
- centos7.4三机准备
- 防火墙
- 软件安装
- 伪双击安装指南
- 操作系统准备