Original connection :( http://www.studyshare.cn/blog-front//blog/details/1169/0 )
First, download
Download the official website: point where Baidu network disk download: point here
Official website download icon:
java development tools Download and install tutorial Guinness, the point here .
More in-depth technical articles in here .
Second, the installation
1, first make sure jdk installed ok, refer to: http: //www.studyshare.cn/blog-front//software/details/1143/0
2, the zookeeper downloaded installation files uploaded to the linux system, you can use ftp tool or use the shortcut alt + p in the window open upload window. Drag and drop file upload zookeeper.
3, decompression
tar -zxvf apache-zookeeper-3.5.5-bin.tar.gz
4, moved to the / usr / local /, and renamed zookeeper
mv apache-zookeeper-3.5.5-bin /usr/local/zookeeper
5, a copy zoo_sample.cfg conf / under and renamed zoo.cfg
cd conf
cp zoo_sample.cfg zoo.cfg
6, modify the configuration file zoo.cfg
datadir=/usr/local/zookeeper/Data/data
dataLogDir=/usr/local/zookeeper/Data/datalog
Not currently exist Data / data folder
You can create: mkdir / usr / local / zookeeper / Data
mkdir /usr/local/zookeeper/Data/data
mkdir /usr/local/zookeeper/Data/datalog
7、修改snapCount,改为10,表示每10次修改会记录一次快照,默认是10000
8、启动zk
cd bin
./zkServer.sh start
./zkServer.sh stop 停止zk
9、验证是否启动成功
jps
显示:
11168 QuorumPeerMain
11183 Jps
10、启动客户端
./zkCli.sh
显示:WatchedEvent state:SyncConnected type:None path:null
表示安装配置成功并且启动已经成功。