您好,登錄后才能下訂單哦!
這篇文章給大家介紹ubuntu16.04系統(tǒng)中怎么安裝zookeeper,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。
zookeeper需要java,見https://my.oschina.net/u/914655/blog/3102583
cd /app wget http://mirror-hk.koddos.net/apache/zookeeper/zookeeper-3.5.5/apache-zookeeper-3.5.5-bin.tar.gz tar zxvf apache-zookeeper-3.5.5-bin.tar.gz mv apache-zookeeper-3.5.5-bin zookeeper cp conf/zoo.sample.cfg conf/zoo.cfg vim conf/zoo.cfg mkdir data vim data/myid echo 1 > data/myid # 這個(gè)確保和下面的server.x后面的數(shù)字對(duì)應(yīng) vim /etc/hosts # /etc/hosts # 自定義Hosts 10.13.6.1 kafka-node1 10.13.6.2 kafka-node2 10.13.6.3 kafka-node3
zoo.cfg
# The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=/app/zookeeper/data # 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 # 節(jié)點(diǎn)配置信息 server.1=kafka-node1:2888:3888 server.2=kafka-node2:2888:3888 server.3=kafka-node3:2888:3888 #server.A=B:C:D # 其中 A 是一個(gè)數(shù)字,表示這個(gè)是第幾號(hào)服務(wù)器; # B 是這個(gè)服務(wù)器的 ip 地址; # C 表示的是這個(gè)服務(wù)器與集群中的 Leader 服務(wù)器交換信息的端口; # D 表示的是如果集群中的 Leader 服務(wù)器故障,需要一個(gè)端口來重新進(jìn)行選舉,選出一個(gè)新的 Leader,而這個(gè)端口就是#用來執(zhí)行選舉時(shí)服務(wù)器相互通信的端口。 # # Be sure to read the maintenance section of the # administrator guide before turning on autopurge. # # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # # The number of snapshots to retain in dataDir #autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature #autopurge.purgeInterval=1
關(guān)于ubuntu16.04系統(tǒng)中怎么安裝zookeeper就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。