您好,登錄后才能下訂單哦!
1.解壓(按照簡單安裝操作)
2.修改配置文件
vim 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=/usr/local/zookeeper/data dataLogDir=/usr/local/zookeeper/log # 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 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 server.186=10.1.44.186:2888:3888 server.187=10.1.44.187:2888:3888 server.188=10.1.44.188:2888:3888
3.創(chuàng)建所需文件夾
mkdir -p /usr/local/zookeeper/data mkdir -p /usr/local/zookeeper/log
4.配置文件傳輸給其他zookeeper集群節(jié)點
scp zoo.cfg
5.創(chuàng)建myid標識文件(同上面server.186的尾號)
# 186 server cd /usr/local/zookeeper/data echo '186' > myid # 187 server cd /usr/local/zookeeper/data echo '187' > myid # 188 server cd /usr/local/zookeeper/data echo '188' > myid
6.啟動
# 186 server /usr/local/zookeeper/bin/zkServer.sh start -------------- ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Starting zookeeper ... STARTED /usr/local/zookeeper/bin/zkServer.sh status -------------- ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Mode: follower # 187 server /usr/local/zookeeper/bin/zkServer.sh start -------------- ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Starting zookeeper ... STARTED /usr/local/zookeeper/bin/zkServer.sh status -------------- ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Mode: leader # 188 server /usr/local/zookeeper/bin/zkServer.sh start -------------- ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Starting zookeeper ... already running as process 1946. /usr/local/zookeeper/bin/zkServer.sh status -------------- ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Mode: follower
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。