Download and install the linux environment zookeeper

Step a: Installation and Configuration Environment jdk

1, downloading codecs jdk-8u221-linux-x64.tar.gz

2, open the configuration file, vim / etc / profile, add the following configuration, remember to add the complete source / etc / profile

 

 

3, after jdk installed, you can view the version information: java -version

 

 

Step two: Start installation configuration zookeeper

1, remote download zookeeper

Sometimes jdk version and the version is not compatible zookeeper, zookeeper will lead to an unsuccessful run, my jdk 1.8

Download zookeeper link below: wget http://www-eu.apache.org/dist/zookeeper/stable/apache-zookeeper-3.5.6-bin.tar.gz

2, extract 

 

 3, after viewing extracting files

 

 

4, configuration, perform conf folder, the file is renamed zoo_sample.cfg zoo.cfg, because zookeeper default configuration file name is loaded zoo.cfg

 

 5, open zoo.cfg file, modify the data and log storage directory, which dataDir and dataLogDir first create the corresponding directory

 

 6, configuration etc / profile file, add the directory zookeeper installed in the background file, save source / etc / profile

 

 

Step three, zookeeper command, enter the zookeeper installation directory bin folder

 

1, start the background service zookeeper: zkServer.sh start

2, shut down zookeeper back-office services: zkServer.sh stop

3, see the zookeeper background service running state: zkServer.sh status

4, zkCli.sh client-related operation is zookeeper

Guess you like

Origin www.cnblogs.com/caohanren/p/12070757.html