Linux 安装 Zookeeper
Linux安装Zookeeper
下载安装包
进入到 Apache ZooKeeper,下载安装包(注意下载可执行包,不是源码包)
解压安装包
1 2 3 4 5 6 7 8
| sudo tar -zxvf apache-zookeeper-3.6.3-bin.tar.gz -C /opt/soft
sudo mv /opt/soft/apache-zookeeper-3.6.3-bin /opt/soft/zookeeper-3.6.3
cd /opt/soft/zookeeper-3.6.3 sudo mkdir data
|
配置文件
1 2 3 4
| cd /opt/soft/zookeeper-3.6.3/conf
sudo cp zoo_sample.cfg zoo.cfg
|
修改配置文件
1 2 3 4
| sudo vi zoo.cfg
dataDir=/opt/soft/zookeeper-3.6.3/data
|
启动
1 2 3 4 5 6 7 8
| cd /opt/soft/zookeeper-3.6.3
./bin/zkServer.sh start zoo.cfg
./bin/zkServer.sh stop zoo.cfg
|
查看
使用jps命令查看zookeeper进程
1 2 3
| $ jps 1972 QuorumPeerMain 2011 Jps
|