安装java环境
下载jdk包:
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
/etc/profile文件加入一下环境变量:
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}
验证:
[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)
安装maven打包环境
[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
安装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
最后输出如下代表成功:
准备配置文件并启动服务:
[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 &
基本操作
通过UI界面操作尽量规避掉人为操作的多种不确定性因素导致生产故障
浏览器访问,下面的用户名和密码提示是config.cfg中loginMessage字段写死的生产中修改掉即可:
添加目录:
添加变量:
同时对于历史变量,我们也可以update:
支持历史修改的记录功能:
一键导出功能是直接在web页面显示出来,不知道有没有API形式可供调用从而形成自动备份: