Install java environment
Download the jdk package :
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html [root@b5155366939b /]# mkdir /usr/java [root@b5155366939b java]# wget https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/java/jdk/8u271-b09/61ae65e088624f5aaa0b1d2d801acb16/jdk-8u271-linux-x64.tar.gz [root@b5155366939b java]# tar xf jdk-8u271-linux-x64.tar.gz
Add the following environment variables to the /etc/profile file :
export JAVA_HOME=/usr/java/jdk1.8.0_271 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin export PATH=$PATH:${JAVA_PATH}
Verification :
[root@b5155366939b java]# java -version openjdk version "1.8.0_265" OpenJDK Runtime Environment (build 1.8.0_265-b01) OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)
Install maven packaging environment
[root@b5155366939b ~]# wget https://mirror.bit.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz [root@b5155366939b ~]# tar xf apache-maven-3.6.3-bin.tar.gz [root@b5155366939b ~]# mv apache-maven-3.6.3 /usr/local/maven [root@b5155366939b ~]# echo 'export PATH=/usr/local/maven/bin:$PATH' >>/etc/profile [root@b5155366939b ~]# source /etc/profile
Install zkui
[root@b5155366939b ~]# git clone https://github.com/DeemOpen/zkui.git [root@b5155366939b ~]# cd zkui [root@b5155366939b zkui]# /usr/local/maven/bin/mvn clean install
Finally, the following output represents success :
Prepare the configuration file and start the service:
[root@b5155366939b zkui]# mkdir /data/zkui [root@b5155366939b zkui]# cp target/zkui-2.0-SNAPSHOT-jar-with-dependencies.jar /data/zkui/ [root@b5155366939b zkui]# cp config.cfg /data/zkui/ [root@b5155366939b zkui]# cd /data/zkui/ [root@b5155366939b zkui]# nohup java -jar zkui-2.0-SNAPSHOT-jar-with-dependencies.jar &
Basic operation
Through the UI interface operation, try to avoid a variety of uncertain factors caused by human operation to cause production failures
Browser access , the following user name and password prompt is the loginMessage field in config.cfg is hard-coded and modified in production :
Add directory :
Add variables :
At the same time, for historical variables , we can also update :
Support history modification recording function :
The one-click export function is displayed directly on the web page . I don’t know if there is an API available to call to form an automatic backup :