您好,登錄后才能下訂單哦!
[root@localhost zookeeper-3.4.6]# tar zxvf zookeeper-3.4.6.tar.gz
[root@localhost zookeeper-3.4.6]# pwd
/home/zookeeper/zookeeper-3.4.6
[root@localhost zookeeper-3.4.6]#
[root@localhost zookeeper-3.4.6]# mkdir data
進(jìn)入目錄:cd conf
/home/zookeeper/zookeeper-3.4.6/conf
[root@localhost conf]# mv zoo_sample.cfg zoo.cfg
vim zoo.cfg
----------------------------------------------
1 # The number of milliseconds of each tick
2 tickTime=2000
3 # The number of ticks that the initial
4 # synchronization phase can take
5 initLimit=10
6 # The number of ticks that can pass between
7 # sending a request and getting an acknowledgement
8 syncLimit=5
9 # the directory where the snapshot is stored.
10 # do not use /tmp for storage, /tmp here is just
11 # example sakes.
12 dataDir=/home/zookeeper/zookeeper-3.4.6/data
13 # the port at which the clients will connect
14 clientPort=2181
15 # the maximum number of client connections.
16 # increase this if you need to handle more clients
17 #maxClientCnxns=60
18 #
19 # Be sure to read the maintenance section of the
20 # administrator guide before turning on autopurge.
21 #
22 # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
23 #
24 # The number of snapshots to retain in dataDir
25 #autopurge.snapRetainCount=3
26 # Purge task interval in hours
27 # Set to "0" to disable auto purge feature
28 #autopurge.purgeInterval=1
~
[root@localhost bin]# ./zkServer.sh start =========(啟動方式)
JMX enabled by default
Using config: /home/zookeeper/zookeeper-3.4.6/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED ============(顯示成功)
[root@localhost bin]# ./zkServer.sh status =======(查看狀態(tài)方式)
JMX enabled by default
Using config: /home/zookeeper/zookeeper-3.4.6/bin/../conf/zoo.cfg
Mode: standalone (單獨的 -- 解釋問單利模式) ===========(查看狀態(tài) )
[root@localhost bin]#
[root@localhost bin]# ./zkServer.sh stop =====(關(guān)閉)
JMX enabled by default
Using config: /home/zookeeper/zookeeper-3.4.6/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
[root@localhost bin]#
[root@localhost bin]# ./zkServer.sh status ====(關(guān)閉狀態(tài))
JMX enabled by default
Using config: /home/zookeeper/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
(錯誤聯(lián)系服務(wù)。它可能不會運行。)
[root@localhost bin]#
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。