RocketMQ Dashboard 源码安装
源码地址:apache/rocketmq-dashboard
下载并解压,切换至源码目录 rocketmq-dashboard-master/
① 编译 rocketmq-dashboard
$ mvn clean package -Dmaven.test.skip=true
② 运行 rocketmq-dashboard
直接以 jar 的方式,启动控制台。注意,控制台使用 8080 端口。命令行操作如下:
$ java -jar target/rocketmq-dashboard-1.0.1-SNAPSHOT.jar --server.port = 8083
# 或者
$ nohup java -jar rocketmq-dashboard-1.0.1-SNAPSHOT.jar --server.port = 8083 &
提示:Started App in x.xxx seconds (JVM running for x.xxx) 启动成功
浏览器页面访问:namesrv.addr:8080
关闭 rocketmq-dashboard : ctrl + c
再次启动:执行 ②
tips:下载后的源码需要上传到 Linux 系统上编译,本地编译可能会报错。
开机自启动
配置开机启动脚本:
[root@rocketmq ~]# vi /lib/systemd/system/rocketmq-dashboard.service
脚本内容:
[Unit]
Description=RocketMQ 5.x Dashboard
After=network.target remote-fs.target nss-lookup.target
[Service]
User=rocketmq
Environment='JAVA_HOME=/usr/local/java'
ExecStart=/usr/bin/java -jar /usr/local/rocketmqDashboard/rocketmq-dashboard-1.0.1-SNAPSHOT.jar -Drocketmq.namesrv.addr=127.0.0.1:9876
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=on-failure
StartLimitInterval=60
StartLimitBurst=3000
[Install]
WantedBy=multi-user.target
设置随机启动:
[root@rocketmq ~]# systemctl daemon-reload
[root@rocketmq ~]# systemctl enable rocketmq-dashboard.service
[root@rocketmq ~]# systemctl start rocketmq-dashboard.service
[root@rocketmq ~]# systemctl status rocketmq-dashboard.service
作者:Jeebiz 创建时间:2023-01-29 18:42
最后编辑:Jeebiz 更新时间:2024-11-01 10:06
最后编辑:Jeebiz 更新时间:2024-11-01 10:06