單機跑集群,以下是安裝步驟
1.將zookeeper-3.4.6.tar.gz安裝複製到linux /usr/local/zookeeper
2.解壓zookeeper包
# tar -zxf zookeeper-3.4.6.tar.gz
3.將解壓的檔案複製三份,分別命名為zookeeper1、zookeeper2、zookeeper3
4.在zookeeper1、zookeeper2、zookeeper3,這三個中都在conf中將 zoo_sample.cfg檔名該為zoo.cfg
# mv zoo_sample.cfg zoo.cfg
5.在zookeeper1、zookeeper2、zookeeper3,這三個中修改zoo.cfg檔案內容
a、#datadir為myid的目錄
datadir=/usr/local/solrcloud/zookeeper1/data (zookeeper2中為/usr/local/solrcloud/zookeeper2/data、zookeeper3中為/usr/local/solrcloud/zookeeper3/data)
b、clientport=2181(zookeeper2中為2182、zookeeper3中為2183)
c、新增:
6、在zookeeper1、zookeeper2、zookeeper3中在datadir指定的目錄下 建立myid檔案
檔案內容分別為1,2,3
7、啟動:
[root@centos-01 zookeeper]# zookeeper1/bin/zkserver.sh start
Zookeeper單機偽集群
mkdir p server1 server2 server3 mkdir p data datalog logs 建立乙個myid的檔案,裡面寫入乙個數字,比如我這個是server1,那麼就寫乙個1,server2對應myid檔案就寫入2,server3對應myid檔案就寫個3 複製zoo sam...
Zookeeper單機偽集群
mkdir p server1 server2 server3 mkdir p data datalog logs 建立乙個myid的檔案,裡面寫入乙個數字,比如我這個是server1,那麼就寫乙個1,server2對應myid檔案就寫入2,server3對應myid檔案就寫個3 複製zoo sam...
zookeeper單機集群配置
zookeeper集群配置 一 拷貝複製拷貝到多目錄 z1 z2 z3 二 配置 zoo.cfg z1 配置 ticktime 2000 initlimit 10 synclimit 5 datadir zoo tmp zookeeper data1 datalogdir zoo log zooke...