标签:zookeeper
1.安装java#!/bin/bash # rpm -ivh jdk-8u144-linux-x64.rpm # java -version java version "1.8.0_144"
2.安装zookeeper
下载地址 : http://zookeeper.apache.org/releases.html
tar zxvf zookeeper-3.4.10.tar.gz mv zookeeper-3.4.10 /usr/local/zookeeper cd /usr/local/zookeeper mkdir data cd /usr/local/zookeeper/conf cp -a zoo_sample.cfg zoo.cfg vim zoo.cfg ---------------- tickTime=2000 initLimit=10 syncLimit=5 dataDir=/usr/local/zookeeper/data clientPort=2181 ---------------- /usr/local/zookeeper/bin/zkServer.sh stop # 停止ZooKeeper服务器 /usr/local/zookeeper/bin/zkServer.sh start # 启动ZooKeeper服务器 ---------------- ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Starting zookeeper ... STARTED ---------------- /usr/local/zookeeper/bin/zkCli.sh # 启动CLI,输入上面的命令后,您将被连接到zookeeper服务器 [zk: localhost:2181(CONNECTED) 0] h # 输入h,进入帮助 [zk: localhost:2181(CONNECTED) 3] quit
标签:zookeeper
原文地址:http://blog.51cto.com/13634837/2087479