c语言sscanf函数的用法是什么
359
2022-11-25
zookeeper 部署
zookpeer 部署:配置java环境:yum repolist (查看epel )yum info zookeeer1、yum install java-1.7.0-openjdk-devel2、vim /etc/profile.d/java.shexport JAVA_HOME=/usr#./etc/profile.d/java.sh source /etc/profile.d/java.sh
免密:ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.100.10 192.168.100.30 node03.magedu.com node03 192.168.100.20 node02.magedu.com node02192.168.100.10 node01.magedu.com node01
配置java.sh 环境:vim /etc/profile.d/java.sh export JAVA_HOME=/usr./etc/profile.d/java.sh source /etc/profile.d/java.shscp /etc/profile.d/java.sh node03:/etc/profile.d scp /etc/profile.d/java.sh node02:/etc/profile.d
解压zookeeper包:[root@node01 ~]# tar xf zookeeper-3.4.8.tar.gz -C /usr/local cd /usr/local/[root@node01 local]# ln -sv zookeeper-3.4.8 zookeeper
创建数据目录:mkdir /data/zookeeper -pv [root@node01 conf]# mv /usr/local/zookeeper/conf zoo_sample.cfg zoo.cfg
[root@node01 conf]# cat zoo.cfg |egrep -v "^$|^#"tickTime=2000initLimit=10syncLimit=5dataDir=/data/zookeeperclientPort=2181server.1=192.168.100.10:2888:3888server.2=192.168.100.20:2888:3888server.3=192.168.100.30:2888:3888
cd /data/zookeepernode01:echo 1 > myid node02:echo 2 > myidnode03:echo 3 > myid 启动服务:/usr/local/zookeeper/bin/zkServer.sh start
客户端连接:
[root@node01 bin]# pwd /usr/local/zookeeper/bin[root@node01 bin]# ./zkCli.sh
查看leader telnet 192.168.100.10 2181
[root@node01 bin]# telnet 192.168.100.30 2181 Trying 192.168.100.30...Connected to 192.168.100.30.Escape character is '^]'.statZookeeper version: 3.4.8--1, built on 02/06/2016 03:18 GMTClients:/192.168.100.10:538520
Latency min/avg/max: 0/0/0Received: 1Sent: 0Connections: 1Outstanding: 0Zxid: 0x100000002Mode: leaderNode count: 4Connection closed by foreign host.
github 网站:https://github.com/linux-deb/zookeeper
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~