Hadoop学习之Zookeeper安装

解压

#tar -zxvf zookeeper-3.4.10.tar.gz
# rm -rf zookeeper-3.4.10.tar.gz
# mv zookeeper-3.4.10/ zookeeper
# cd zookeeper/
#vi /etc/profile
export ZOOKEEPER_HOME=/root/training/zookeeper

export PATH=$PATH:$ZOOKEEPER_HOME/bin

#source /etc/profile
#cd conf
# cp zoo_sample.cfg zoo.cfg
# mkdir ~/training/zookeeper/data
# vi zoo.cfg 
dataDir=/root/training/zookeeper/data
server.1=192.168.56.21:2888:3888
server.2=192.168.56.22:2888:3888
server.3=192.168.56.23:2888:3888
server.4=192.168.56.24:2888:3888

# cd ../data/

#echo 1 > myid   //hadoop21
#echo 2 > myid   //hadoop22
#echo 3 > myid   //hadoop23
#echo 4 > myid   //hadoop24

#cd ../..
# zkServer.sh start
# zkServer.sh status
# zkServer.sh stop

你可能感兴趣的:(Hadoop学习之Zookeeper安装)