命令tar -zxvf 檔名。
2. 建立資料存放目錄和日誌存放目錄
mkdir home/zookeeper/data
mkdir home/zookeeper/logs
3. 將zookeeper-3.4.3/conf目錄下的zoo_sample.cfg檔案拷貝乙份,命名為為「zoo.cfg」。 修改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=/home/zookeeper/data
datalogdir=/home/zookeeper/logs
# the port at which the clients will connect
clientport=2181
## be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
## ## 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
# 2888,3888 are election port
server.1=zookeeper:2888:3888
4、建立datadir引數指定的目錄(這裡指的是「 /home/hadooptest/zookeeper-3.4.3/zookeeperdir/zookeeper-data」),並在目錄下建立檔案,命名為「myid」。
5、在/etc/profile檔案中設定path
修改profile檔案:
sudo vi /etc/profile
export zookeeper_home=/home/hadooptest/zookeeper-3.4.3
path=$zookeeper_home/bin:$path
export path
6、在所有伺服器中執行:
./bin/zookeeper-server-start.sh ../config/zookeeper.properties &
7、輸入jps命令檢視程序
4 搭建ZooKeeper環境
安裝目錄為 usr local 1.配置基本環境變數 對zookeeper 3.4.5.tar.gz進行解壓縮 tar zxvf zookeeper 3.4.5.tar.gz 對zookeeper目錄進行重新命名 mvzookeeper 3.4.5 zk 配置zookeeper相關的環境變數 vi ...
ZooKeeper集群環境搭建
主機名 ip位址 myid hadoop101 192.168.88.101 1hadoop102 192.168.88.102 2hadoop103 192.168.88.103 3注 需要修改三颱虛擬機器的主機名,並關閉防火牆 在三颱虛擬機器中安裝jdk8,並設定環境變數 centos7安裝jd...
zookeeper環境搭建簡記
一 準備3臺機器執行一下操作 tar xzf tmp zookeeper 3.4.8.tar.gz c usr local chown r hadoop hadoop usr local zookeeper 3.4.8 chmod r 770 usr local zookeeper 3.4.8 ln...