1. 访问debezium-ui的代码仓库,下载源码
2. 解压zip源码包:
TEST[hadoop@shdcvfsla1894 ~]$ cd /data/moduleTEST[hadoop@shdcvfsla1894 module]$ unzip debezium-ui-main.zip
3. 确保基础环境:
CentOS-7
nodejs version>=16
npm version>=8
注:CentOS-8不用考虑这个问题
Java version>=11
4. 修改nodejs/npm版本配置:
TEST[hadoop@shdcvfsla1894 ~]$ cd /data/module/debezium-ui-mainTEST[hadoop@shdcvfsla1894 debezium-ui-main]$ vim ui/pom.xml<properties><node.version>16.20.0</node.version><npm.version>8.19.4</npm.version></properties>
5. 开始编译:
TEST[hadoop@shdcvfsla1894 debezium-ui-main]$ ./mvnw clean install -Dmaven.test.skip=true[INFO] ------------------------------------------------------------------------[INFO] Reactor Summary for Debezium UI Build Aggregator 2.3.0-SNAPSHOT:[INFO][INFO] Debezium UI Build Aggregator ....................... SUCCESS [ 0.179 s][INFO] Debezium UI Frontend ............................... SUCCESS [02:48 min][INFO] Debezium UI Backend ................................ SUCCESS [ 55.946 s][INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 03:45 min[INFO] Finished at: 2023-06-12T11:23:15+08:00[INFO] ------------------------------------------------------------------------
6. 修改Kafka-Connect集群配置:
TEST[hadoop@shdcvfsla1894 debezium-ui-main]$ vim backend/src/main/resources/application.propertieskafka.connect.uris=http://shdcvfsla1893:8083
7. 启动Debezium UI服务器:
TEST[hadoop@shdcvfsla1894 debezium-ui-main]$ nohup ./mvnw -am -pl backend package quarkus:dev 2>&1 &TEST[hadoop@shdcvfsla1894 debezium-ui-main]$ tail -f nohup.outListening for transport dt_socket at address: 5005Press [h] for more options>Tests pausedPress [r] to resume testing, [h] for more options>Press [r] to resume testing, [o] Toggle test output, [h] for more options>__ ____ __ _____ ___ __ ____ ______--/ __ \/ / / / _ | / _ \/ //_/ / / / __/-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \--\___\_\____/_/ |_/_/|_/_/|_|\____/___/2023-06-12 11:08:28,377 INFO [io.quarkus] (Quarkus Main Thread) debezium-ui-backend 2.3.0-SNAPSHOT on JVM (powered by Quarkus 3.0.2.Final) started in 5.596s. Listening on: http://localhost:80802023-06-12 11:08:28,380 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.2023-06-12 11:08:28,381 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, rest-client, resteasy, resteasy-jsonb, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx]
8. 安装Nginx以端口转发形式开启web服务:
注:如果无端口转发,默认Debezium UI只开通在shdcvfsla1894的localhost的8080端口,外部无法访问,且目前版本无修改ui.base.uri配置的入口。
8-1. 登录Nginx官网下载Nginx:
8-2. 解压Nginx安装包:
TEST[hadoop@shdcvfsla1894 ~]$ cd /data/moduleTEST[hadoop@shdcvfsla1894 module]$ tar -zxvf nginx-1.24.0.tar.gz
8-3. 基础环境配置:
TEST[hadoop@shdcvfsla1894 ~]$ sudo yum -y install openssl openssl-devel
8-4. 配置Nginx:
TEST[hadoop@shdcvfsla1894 ~]$ cd /data/module/nginx-1.24.0TEST[hadoop@shdcvfsla1894 module]$ ./configure --prefix=/usr/local/nginx-1.24.0 --with-http_ssl_module --with-http_stub_status_module
8-5. 编译及安装Nginx:
TEST[hadoop@shdcvfsla1894 module]$ make & make install
8-6. 启动Nginx:
TEST[hadoop@shdcvfsla1894 ~]$ cd /usr/local/nginx-1.24.0TEST[hadoop@shdcvfsla1894 nginx-1.24.0]$ sudo /usr/local/nginx-1.24.0/sbin/nginx
8-7. 访问测试Nginx:
http://shdcvfsla1894:80
8-8. 配置Nginx Conf实现Debezium UI的端口转发:
注:10.132.122.155为shdcvfsla1894的 IP
TEST[hadoop@shdcvfsla1894 nginx-1.24.0]$ vim conf/nginx.confserver {listen 18080;server_name 10.132.122.155;location / {root html;index index.html index.htm;proxy_pass http://127.0.0.1:8080;}}
9. Web访问Debezium UI:
http://shdcvfsla1894:18080