以前安装了一个em工具,现在过期,无法执行destroy,如何手动卸载em组件呢

em那个是做社区活动测试用的,不能直接使用自己的tiup操作那个,现在那个活动授权到期了,导致部署的东西删除失败,正常的tiup都是能用的,它的集群和em的集群不一样

所以你其实是想删除 em 相关集群和 em 相关部署的东西?

是的1

没试过 em

你看下 .em 的目录结果。

cd .em
tree

结果发来看看

(base) [root@master241 ~]# su - tidb
Last login: Tue Jan 20 13:45:56 CST 2026 on pts/0
[tidb@master241 ~]$ cd .em/
[tidb@master241 .em]$ tree
.
├── bin
│   └── root.json
├── components
│   └── em
│       └── v1.0.2
│           └── tiup-em
├── data
├── history
│   └── tiup-history-0
├── keys
│   ├── 034ad61a5c6f7595-root.json
│   ├── 160f9f04b1b6033b-timestamp.json
│   ├── 54d9ae27792b0a6d-snapshot.json
│   ├── 61852ffdf7dfd90b-root.json
│   ├── 70bdbd430af218ff-root.json
│   ├── 8ae093f3ba03bf81-index.json
│   └── private.json
├── logs
│   └── tiup-cluster-debug-2023-06-16-02-22-40.log
├── manifests
│   ├── alertmanager.json
│   ├── cluster-server.json
│   ├── elasticsearch.json
│   ├── em.json
│   ├── filebeat.json
│   ├── file-server.json
│   ├── grafana.json
│   ├── index.json
│   ├── jaeger.json
│   ├── kibana.json
│   ├── nginx.json
│   ├── node-exporter.json
│   ├── openapi-server.json
│   ├── prometheus.json
│   ├── snapshot.json
│   └── timestamp.json
├── storage
│   └── em
│       ├── clusters
│       │   └── em-test
│       │       ├── backup
│       │       ├── config-cache
│       │       │   ├── alertmanager-localhost-4112.service
│       │       │   ├── alertmanager_localhost.yml
│       │       │   ├── blackbox_localhost.yaml
│       │       │   ├── cluster-server-localhost-4101.service
│       │       │   ├── dashboard_localhost.yml
│       │       │   ├── datasource_localhost.yml
│       │       │   ├── elasticsearch-localhost-4108.service
│       │       │   ├── elasticsearch_localhost_4108.yml
│       │       │   ├── filebeat-localhost-0.service
│       │       │   ├── filebeat_localhost_0.yml
│       │       │   ├── file_localhost_4102.yml
│       │       │   ├── file-server-localhost-4102.service
│       │       │   ├── grafana-localhost-4111.service
│       │       │   ├── grafana_localhost.ini
│       │       │   ├── jaeger-localhost-4114.service
│       │       │   ├── kibana-localhost-4109.service
│       │       │   ├── kibana_localhost_4109.yml
│       │       │   ├── nginx_localhost_4180.conf
│       │       │   ├── nginx-localhost-4180.service
│       │       │   ├── nginx_server_config_localhost_4180.conf
│       │       │   ├── node-exporter-localhost-4124.service
│       │       │   ├── openapi_localhost_4100.yml
│       │       │   ├── openapi-server-localhost-4100.service
│       │       │   ├── prometheus-localhost-4110.service
│       │       │   ├── prometheus_localhost_4110.yml
│       │       │   ├── run_alertmanager_localhost_4112.sh
│       │       │   ├── run_cluster-server_localhost_4101.sh
│       │       │   ├── run_elasticsearch_localhost_4108.sh
│       │       │   ├── run_filebeat_localhost_0.sh
│       │       │   ├── run_file-server_localhost_4102.sh
│       │       │   ├── run_grafana_localhost_4111.sh
│       │       │   ├── run_jaeger_localhost_4114.sh
│       │       │   ├── run_kibana_localhost_4109.sh
│       │       │   ├── run_nginx_localhost_4180.sh
│       │       │   ├── run_node-exporter_localhost.sh
│       │       │   ├── run_openapi-server_localhost_4100.sh
│       │       │   └── run_prometheus_localhost_4110.sh
│       │       ├── meta.yaml
│       │       └── ssh
│       │           ├── id_rsa
│       │           └── id_rsa.pub
│       └── packages
│           ├── alertmanager-v0.23.0-linux-amd64.tar.gz
│           ├── cluster-server-v1.0.2-linux-amd64.tar.gz
│           ├── elasticsearch-v7.10.2-linux-amd64.tar.gz
│           ├── filebeat-v7.10.2-linux-amd64.tar.gz
│           ├── file-server-v1.0.2-linux-amd64.tar.gz
│           ├── grafana-v7.5.15-linux-amd64.tar.gz
│           ├── jaeger-v1.26.0-linux-amd64.tar.gz
│           ├── kibana-v7.10.2-linux-amd64.tar.gz
│           ├── nginx-v1.0.2-linux-amd64.tar.gz
│           ├── node-exporter-v1.2.2-linux-amd64.tar.gz
│           ├── openapi-server-v1.0.2-linux-amd64.tar.gz
│           └── prometheus-v2.29.2-linux-amd64.tar.gz
├── telemetry
│   └── meta.yaml
└── tiup.toml

18 directories, 81 files

  • 手动卸载 EM 的核心是停进程 → 删目录 → 清元数据 → 验残留,四步缺一不可;
  • 重点清理 TiUP 元数据目录(~/.tiup/storage/cluster/),避免残留导致后续操作异常;
  • 若 EM 与 TiDB 集群混合部署,需额外清理拓扑文件中的 EM 配置。

看起来这两个文件比较重要,看一下内容。

应该是 tiup 信息和集群拓扑信息。根据相关信息去卸载呢。

信息很少:
[tidb@master241 .em]$ cat tiup.toml
mirror = “/home/tidb/em-repo”
[tidb@master241 .em]$ cat telemetry/meta.yaml
uuid: feec5586-13ca-495a-ad7a-4888add9001e
secret: 995c13af58b32bc5e4d74a1a7a94c4d9
status: enable
[tidb@master241 .em]$

这里,看岔了。
storage 》em > clusters > em-test > meta.yaml

这个文件的确是部署相关的配置,按照这个配置来手动删除文件夹吗,还是说有相关命令可以删除

删除EM配置目录

rm -rf $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_*
rm -rf $ORACLE_HOME/enterprise/mgmt/db
rm -rf $ORACLE_HOME/sysman/emd
rm -rf $ORACLE_HOME/sysman/config

删除EM日志文件

rm -rf $ORACLE_BASE/diag/rdbms///em
rm -rf $ORACLE_BASE/flash_recovery_area/*/oem

删除EM启动脚本

rm -rf /etc/init.d/dbconsole*

根据文件信息手动卸载吧。

当然你要是对 tiup 这个工具比较熟悉的话,可以根据 meta 信息来让 tiup 管理这个集群,然后用 tiup 来释放这个集群。
看下这个帖子:误删$home/.tiup文件夹,如何找回已部署的集群信息 - #3,来自 来了老弟

还是手动删除吧 不太重要的东西 谢谢大佬

TiUP 镜像过期,好像只能手动卸载

此话题已在最后回复的 7 天后被自动关闭。不再允许新回复。