centos 7 installation zookeeper

Recently re-find a new little project online mall, mall Tao Tao is at the end of 16 upgraded version of the cube should be Mall, would like to combine previously learned Tao Tao mall, consolidate practice a bit before learning. Because recent interview asked questions, a lot of content have forgotten about it, so I want to pick up this project again, Reviewing the Old!

Video used in all centos6.4 version, JDK 1.7, after all, now is 9102 years, and they still try to use the new centos7.0, JDK1.8 to try, though often problems with various versions change causes problems stuck for a long time, but the work will always run into this problem, it is important to learn how to solve problems, but also record your own blog writing stepped pit, but also hope to help some of the same problems encountered shoes.

Decompress video data comes directly secureCRT can not drag and drop FTP upload files to the linux server, the whole for a long time did not understand, do not know the reason version. Or directly installed scrt_sfx704-x64 version, then the Tao Tao mall cracking tools to crack directly, directly drag and drop to upload, it is convenient, it is recommended to use!

First, install jdk

In the beginning forget to install linux jdk environment, leading to the installation zookeeper has been unable to check the status of the status command, briefly outline how to install jdk in linux environment.

There are two methods to install jdk:

A. By yum you commands directly select the version installed directly

II. By downloading the archive, unzip uploaded to the server configured to use.

 

With specific reference to this blog  https://blog.csdn.net/qq_42815754/article/details/82968464

Second, the installation zookeeper

1. Upload by secureCRT SFTP functions to the server:

2. Extract

tar -zxvf zookeeper-3.4.6.tar.gz

3. Enter the zookeeper directory, create a data directory

cd zookeeper-3.4.6
mkdir data

4. Enter the conf directory, zoo_sample.cfg renamed zoo.cfg

mv zoo_sample.cfg zoo.cfg

5. Use vi or vim modify zoo.cfg in the dataDir to data directory just created

Replaced by:

/root/zookeeper-3.4.6/data

Press the ESC key to enter: wq to save changes to exit

6.启动zookeeper

启动: ./zkServer.sh start
关闭: ./zkServer.sh stop
查看状态:./zkServer.sh status

总结:

一开始没有安装JDK直接安装zookeeper能够执行 ./zkServer.sh start 命令,但是无法查看状态,并没有启动成功,执行status命令时会提示:Error contacting service. It is probably not running。网上很多说没有关闭防火墙可能也会导致这个问题,我这里是因为没有安装jdk导致。

centos 7 关闭防火墙与6不太一样,

centos 7 防火墙命令:

启动: systemctl start firewalld

关闭: systemctl stop firewalld

查看状态: systemctl status firewalld 

开机禁用  : systemctl disable firewalld

开机启用  : systemctl enable firewalld

 

Guess you like

Origin blog.csdn.net/qq_20377675/article/details/89297269