1 2 3 4 5 6 7
| yum install -y wget useradd zk su zk mkdir ~/tools && cd ~/tools wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.0/apache-zookeeper-3.8.0-bin.tar.gz tar -zxf apache-zookeeper-3.8.0-bin.tar.gz -C ../ mv apache-zookeeper-3.7.1-bin zookeeper
|
单节点
1 2 3 4 5 6 7 8 9 10 11 12 13
| cat > ~/zookeeper/conf/zoo.cfg << EOF tickTime=2000 initLimit=10 syncLimit=5 dataDir=/home/zk/zookeeper-data clientPort=22181 #maxClientCnxns=60 #autopurge.snapRetainCount=3 #autopurge.purgeInterval=1 #metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider #metricsProvider.httpPort=7000 #metricsProvider.exportJvmInfo=true EOF
|
启动
1
| ~/zookeeper/bin/zkServer.sh start
|
本文地址: https://github.com/maxzhao-it/blog/post/b829b66a/