Reprint a great God in my heart about zookeeper Web articles
Previously wrote a zookeeper cluster construction of the article " Slime: Zookeeper cluster Build ", recently in the use of ACTIVEMQ cluster process encountered some problems related to zookeeper, You want to view the zookeeper cluster's data through the UI.
Find out, find Zkui This UI tool is very good, this article will introduce the construction and configuration of Zkui.
PS: Here we take the zookeeper cluster data of the ACTIVEMQ cluster as an example.
First, the initialization of the environment
Zkui is based on Java language development, first of all we need to install the JDK environment.
Because Zkui requires us to compile, build, and package manually, we also need to install the MAVEN environment.
For the installation and configuration of MAVEN, refer to this article, " Slime: Dependency Management maven3.3 installation and configuration ."
To install jdk1.7, use the following command:
wget http://mirrors.linuxeye.com/jdk/jdk-7u80-linux-x64.tar.gz && tar-xf jdk-7u80-linux-x64.tar.gz -c/usr/local/&& chown root:root-r/usr/local/jdk1.7.0_80/
To add the JDK to the environment variable, use the following command:
Cat >>/etc/profile << "EOF"
Export java_home=/usr/local/jdk1.7.0_80
Exportclasspath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $PATH: $JAVA _home/bin
Eof
Source/etc/profile
Java–version
Second, the jar package of generating Zkui
Zkui 's source package, which we can download on GitHub, is as follows:
Https://github.com/DeemOpen/zkui.git
Taking into account the pull speed from the GitHub repository, I am now synchronizing the repository on the code cloud with the following address:
Https://gitee.com/ilanni/zkui.git
Download the Zkui source package as follows:
git clone https://gitee.com/ilanni/zkui.git
CD zkui/
ll
Compile, build, and package using the MVN command, as follows:
MVN clean Install
Pass We can obviously see Maven packaged as a zkui-2.0-snapshot.jar and Zkui-2.0-snapshot-jar-with-dependencies.jar two files, of which zkui-2.0-snapshot-jar-with-de Pendencies.jar is the jar file we need.
Third, start Zkui
we can run the file directly after the Zkui run Jar file is produced. But before we run the file, we also need to modify the Zkui configuration file config.cfg.
The Config.cfg file is configured with the IP address and port of the zookeeper cluster that the Zkui needs to connect to, the user name and password that accesses the UI, and the port number that the Zkui listens on. as follows:
Zkui the Default user name and password is Admin/manager, which we modified to admin/admin.
Now use the following command to start Zkui, as follows:
Nohupjava-jar Target/zkui-2.0-snapshot-jar-with-dependencies.jar &
NETSTAT-TUNLP |grep 9090
Through, we can see that Zkui has been started. Now we access through the Web interface, as follows:
Description Zkui has been able to access the normal, enter the user name and password, as follows:
Description Zkui and can properly connect the zookeeper cluster, and can see the relevant data.
Zookeeper's Visual Web interface