真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

ZooKeeperInstall

Tar -zxvf zookeeper-3.4.10.tar.gz
[root@hmaster local]# rm -rf zookeeper-3.4.10.tar.gz
遠(yuǎn)程傳輸zookeeper-3.4.10到其他節(jié)點(diǎn)
[root@hmaster local]# scp -r /usr/local/zookeeper-3.4.10 root@hslave1:/usr/local/
[root@hmaster local]# ls
bin etc games hadoop hive include java lib lib64 libexec python3Dir sbin share src zookeeper-3.4.10
[root@hmaster conf]# ls
configuration.xsl log4j.properties zoo_sample.cfg
[root@hmaster conf]# cp zoo_sample.cfg zoo.cfg
[root@hmaster conf]# ls
configuration.xsl log4j.properties zoo.cfg zoo_sample.cfg
編輯配置文件
[root@hmaster conf]# vim zoo.cfg
#第一個(gè)端口號2888 是Leader與follower之間通訊的端口;3888是選舉使用的端口號
#autopurge.purgeInterval=1
server.0=172.26.19.40:2888:3888
server.1=172.26.19.41:2888:3888
server.2=172.26.19.42:2888:3888
根據(jù)zoo.cfg 文件中dataDir=/tmp/zookeeper 創(chuàng)建相應(yīng)目錄,配置myid文件,使得集群映射
[root@hslave1 conf]# cd /tmp
[root@hslave1 tmp]# ls
hsperfdata_root systemd-private-d38862e2d5524a42994bdd9ddd858f50-chronyd.service-nIGJPI
[root@hslave1 tmp]# mkdir zookeeper
[root@hslave1 tmp]# vim myid
[root@hslave1 tmp]# more myid
1
[root@hslave1 tmp]#
每臺(tái)機(jī)器輸入對IP的信息server.0=172.26.19.40:2888:3888;應(yīng)該輸入0
[root@hmaster bin]# ./zkServer.sh status
[root@hmaster bin]# ./zkServer.sh start
[root@hmaster bin]# ./zkServer.sh stop
[root@hmaster bin]# jps
21690 Jps
21550 QuorumPeerMain
[root@hmaster bin]# kill -9 18976
查看zookeeper日志文件
[root@hmaster bin]# more zookeeper.out

創(chuàng)新互聯(lián)公司堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站設(shè)計(jì)、做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的祁縣網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!

客戶端有相同版本的zookeeper-3.4.10包文件(從遠(yuǎn)程zookeeper節(jié)點(diǎn)拷貝而來)
客戶端登錄
[root@hslave3 bin]# ./zkCli.sh -server hmaster:2181
[zk: hmaster:2181(CONNECTED) 0] help
ZooKeeper -server host:port cmd args
stat path [watch]
set path data [version]
ls path [watch]
delquota [-n|-b] path
ls2 path [watch]
setAcl path acl
setquota -n|-b val path
history
redo cmdno
printwatches on|off
delete path [version]
sync path
listquota path
rmr path
get path [watch]
create [-s] [-e] path data acl
addauth scheme auth
quit
getAcl path
close
connect host:port
[zk: hmaster:2181(CONNECTED) 1] ls /
一致,有頭,數(shù)據(jù)樹
[zk: hslave1:2181(CONNECTED) 0] ls /
[zookeeper]
[zk: hslave1:2181(CONNECTED) 1] create /app app_content
Created /app
[zk: hslave1:2181(CONNECTED) 2] ls /
[app, zookeeper]
[zk: hslave1:2181(CONNECTED) 3] get /app
app_content
cZxid = 0x200000002
ctime = Mon Dec 10 21:43:19 EST 2018
mZxid = 0x200000002
mtime = Mon Dec 10 21:43:19 EST 2018
pZxid = 0x200000002
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 11
numChildren = 0
[zk: hslave1:2181(CONNECTED) 4] set /app appcontent11
cZxid = 0x200000002
ctime = Mon Dec 10 21:43:19 EST 2018
mZxid = 0x200000003
mtime = Mon Dec 10 21:45:05 EST 2018
pZxid = 0x200000002
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 12
numChildren = 0
[zk: hslave1:2181(CONNECTED) 5] get /app
appcontent11
cZxid = 0x200000002
ctime = Mon Dec 10 21:43:19 EST 2018
mZxid = 0x200000003
mtime = Mon Dec 10 21:45:05 EST 2018
pZxid = 0x200000002
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 12
numChildren = 0
[zk: hslave1:2181(CONNECTED) 6] delete /app
[zk: hslave1:2181(CONNECTED) 7] ls /
[zookeeper]


當(dāng)前文章:ZooKeeperInstall
標(biāo)題鏈接:http://weahome.cn/article/gddhpd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部