MENU

Zookeeper UI管理界面安装

June 29, 2021 • Read: 362 • 默认分类

1、安装java环境

JDK 1.8 :JDK下载地址 https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

环境变量:

export JAVA_HOME=/usr/local/jdk1.8.0_202
export PATH=$PATH:$GOROOT/bin
export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin

查看版本号:

source /etc/profile
java –version

2、安装maven打包环境

maven 3.8.1 :Apache-maven下载地址 https://maven.apache.org/download.cgi


# tar -zxvf apache-maven-3.8.1-bin.tar.gz
# mv apache-maven-3.8.1 /usr/local/maven
# echo 'export PATH=/usr/local/maven/bin:$PATH' >>/etc/profile
# source  /etc/profile
# mvn -v
Apache Maven 3.8.1 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven-3.8.1

3、在线安装Git

# yum install git
# git --version
git version 1.8.3.1

4、安装zookeeper服务

#下载
wget https://mirrors.bfsu.edu.cn/apache/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz
#解压
tar -zxf apache-zookeeper-3.6.2-bin.tar.gz
mv apache-zookeeper-3.6.2-bin /usr/local/zookeeper
cd /usr/local/apache-zookeeper-3.6.2-bin/conf
#重命名并备份zoo.cfg
cp zoo_sample.cfg zoo.cfg
#进入zk的bin目录
cd /usr/local/apache-zookeeper-3.6.2-bin/bin/
#启动zk
./zkServer.sh start
#查看zk启动状态
./zkServer.sh status

ZooKeeper JMX enabled by default
Using config: /app/apache-zookeeper-3.6.2-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: standalone


5、安装zkui

考虑到从github仓库拉取速度的情况,可以从码云拉取

地址如下:https://gitee.com/ilanni/zkui.git

git clone https://gitee.com/ilanni/zkui.git
cd zkui/
mvn clean install

最后输出如下代表成功:

准备配置文件并启动服务:

# mkdir /data/zkui
# cp zkui/target/zkui-2.0-SNAPSHOT-jar-with-dependencies.jar /data/zkui/
# cp zkui/config.cfg /data/zkui/
# cd /data/zkui
# nohup java -jar zkui-2.0-SNAPSHOT-jar-with-dependencies.jar &

6、开放防火墙

# firewall-cmd --zone=public --add-port=9090/tcp --permanent
# firewall-cmd --zone=public --add-port=2181/tcp --permanent
# firewall-cmd --reload

7、游览器访问

http://localhost:9090/login
账号:admin
密码:manager

基本操作

通过UI界面操作尽量规避掉人为操作的多种不确定性因素导致生产故障

浏览器访问,下面的用户名和密码提示是config.cfg中loginMessage字段写死的生产中修改掉即可:

添加目录:

添加变量:

同时对于历史变量,我们也可以update:

支持历史修改的记录功能:

一键导出功能是直接在web页面显示出来,不知道有没有API形式可供调用从而形成自动备份:

- - - The END - - -
  • 文章作者:谭先生
  • 版权所有:文章转载时,注明出处即可!
  • 本站部分资源收集于网络,纯个人收藏,无商业用途,如有侵权请及时告知!
  • Last Modified: August 4, 2021
    Archives QR Code Tip
    QR Code for this page
    Tipping QR Code
    阅读:362