Debezium UI On ECS编译安装及开放Web访问

1. 访问debezium-ui的代码仓库,下载源码    

GitHub - debezium/debezium-ui: A web UI for Debezium; Please log issues at https://issues.redhat.com/browse/DBZ.

2. 解压zip源码包:

TEST[hadoop@shdcvfsla1894 ~]$ cd /data/module
TEST[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-main
TEST[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.properties
kafka.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.out
Listening for transport dt_socket at address: 5005
Press [h] for more options>
Tests paused
Press [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:8080
2023-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/module
TEST[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.0
TEST[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.0
TEST[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.conf
server {
    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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值