dataDir=D:/bigData/zookeeper-3.4.10/data #日志文件的位置 dataLogDir=D:/bigData/zookeeper-3.4.10/zlog #监听端口 clientPort=2181 #集群服务器配置 server.1=192.168.1.130:9000:7000 server.2=192.168.1.103:9001:7001 server.3=192.168.1.103:9002:7002 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11...
zookeeper下载地址:https://zookeeper.apache.org/releases.html#download 开始安装 (1)rz上传 zookeeper安装包至192.168.60.101的/opt/module下;(2)tar -zxvf apache-zookeeper-3.7.1-bin.tar.gz 解压至当前目录;(3)配置zookeeper环境变量和启动时的堆内存配置(三台虚拟机都需要配置):vim /etc/pr...
7. 连接zookeeper,其中连接端口为2181 zkCli.sh-server192.168.100.10:2181,192.168.100.11:2181,192.168.100.12:2181 如果连接成功可以看到如下信息 2017-08-19 01:48:03,042 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f,...
curatorFramework = CuratorFrameworkFactory.builder().connectString("192.168.162.128:2181").sessionTimeoutMs(60 * 1000).connectionTimeoutMs(15 * 1000) .retryPolicy(retryPolicy).namespace("ming").build(); //开启连接 curatorFramework.start(); } //===监听器=== /** * 给指定节点注册监听器 *...
shzkCli.sh-server192.168.11.1:2181 执行如上命令,连接Zookeeper服务器,结果如下图所示,说明客户...
:2181若出现上图提示所示,表示已经成功连接到服务器。在客户端交互命令行中,输入h查询可以使用的客户端命令:[zk: 127.0.0.1:2181(CONNECTED) 0] h ZooKeeper -server host:port cmd args stat path [watch] set path data [version] ls path [watch]...
hours=168 log.retention.check.interval.ms=300000 zookeeper.connect=192.168.1.61:2181,192.168.1.62:2181,192.168.1.63:2181 zookeeper.connection.timeout.ms=18000 group.initial.rebalance.delay.ms=0 security.inter.broker.protocol=SASL_PLAINTEXT sasl.enabled.mechanisms=PLAIN sasl.mechanism.inter.broker....
[root@192-168-50-191 bin]# export declare -x CLASSPATH=".:/usr/local/java/jdk1.8.0_211/lib/dt.jar:/usr/local/java/jdk1.8.0_211/lib/tools.jar:/usr/local/apache-zookeeper-3.6.2-bin/lib" declare -x HISTCONTROL="ignoredups" declare -x HISTSIZE="1000" declare -x HOME="/root" de...
dataDir=/tmp/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...
apiVersion: v1 kind: ConfigMap metadata: name: my-app-config data: zoo.cfg: | tickTime=2000 initLimit=10 syncLimit=5 dataDir=/var/lib/zookeeper clientPort=2181 server.1=192.168.1.1:2888:3888 server.2=192.168.1.2:2888:3888 server.3=192.168.1.3:2888:3888 复制代码 方法三:在应用程序代码中硬...