License 管理

获取 License

试用版 License

平凯数据库敏捷模式在部署后,导入并激活 License 之前,默认持有试用版 License,有效期为 180 天,试用版 License 无功能限制,可体验所有功能。为了确保您的业务可以正常运行,需要确保及时联系官方支持人员获取商业版 License。

商业版 License

要长期运行平凯数据库敏捷模式集群,需要获取商业版 License 并激活集群,下面将展示 License 的获取流程:

1. 收集硬件信息

在中控机安装并运行 TiUP Cluster 工具,在中控机上执行如下命令,生成硬件信息:

tiup cluster license minfo

硬件信息被记录在命名类似于 minfo-20250630T134049.txt 的文件中。

如果 minfo 文件传出服务器比较困难,还可以通过以下命令生成二维码形式的硬件信息,拍照传递即可:

tiup cluster license minfo -t qrcode

2. 提交机器信息并获取 License;

将上一步得到的 minfo 文件或二维码反馈给官方支持人员,由官方支持人员来处理后续的签发工作。完成签发流程后,会获得一个合法的 License 密文用于后续集群部署和运行。

3. 将获取的 License 添加至中控机

在得到 License 文件后,使用如下命令将 License 添加到 TiUP:

tiup cluster license add -f <license-path>

以上命令中:

  • license-path>指定 License 文件路径

至此,License 添加成功。可以用如下命令查看已安装的 License:

tiup cluster license list

激活平凯数据库敏捷模式集群

在成功获取 License 之后,我们可以开始激活平凯数据库敏捷模式集群。

在中控机上执行如下命令,查看要激活的平凯数据库敏捷模式集群名称:

tiup cluster list

激活指定的平凯数据库敏捷模式集群:

tiup cluster license activate <cluster-name>

以上命令中:

  • <cluster-name>代表要激活的平凯数据库敏捷模式集群名称

激活后,再次查看查看集群的信息:

tiup cluster display <cluster-name>
\Cluster type: tidb Cluster name: tidbx1 Cluster kind: fusion Cluster version: v7.1.8-5.1-0.1 Deploy user: tidb SSH type: builtin Activation: Activated (expires at 2025-09-10) Grafana URL: http://tidb-1.orb.local:23000 Dashboard URL: http://tidb-1.orb.local:22379/dashboard ID Role Host Ports OS/Arch Status Data Dir Deploy Dir -- ---- ---- ----- ------- ------ -------- ---------- tidb-1.orb.local:24000 tidb/tikv/pd tidb-1.orb.local 22379/22380/24000/20080/30160/30180 linux/x86_64 UI|L|UP /tidbx-data/pd-22379,/tidbx-data/tikv-30160 /tidbx-deploy/pd-22379,/tidbx-deploy/tidb-24000,/tidbx-deploy/tikv-30160 tidb-1.orb.local:39093 alertmanager tidb-1.orb.local 39093/39094 linux/x86_64 Up /tidbx-data/alertmanager-39093 /tidbx-deploy/alertmanager-39093 tidb-1.orb.local:23000 grafana tidb-1.orb.local 23000 linux/x86_64 Up - /tidbx-deploy/grafana-23000 tidb-1.orb.local:29090 prometheus tidb-1.orb.local 29090/17020 linux/x86_64 Up /tidbx-data/prometheus-29090 /tidbx-deploy/prometheus-29090 Total nodes: 4

注意观察 Activation 一行,状态转变为 Activated 即为激活成功。

更新 License

若已经部署的平凯数据库敏捷模式集群对应的 License 因过期失效,在查看集群运行状态时会显示 expired:

Cluster type: tidb Cluster name: tidbx-test Cluster kind: fusion Cluster version: nightly Deploy user: tidb SSH type: builtin Activation: Invalid

要添加新的 License 到 TiUP 中,可以在中控机上执行如下命令:

tiup cluster license add -f <license-path>

以上命令中:

  • <license-path>指定 License 文件路径

再次查看集群运行状态,关注到集群状态中 Activation 字段已变为 Activated,至此 License 更新成功。

【可选】删除失效的 License

在中控机上执行如下命令,查看 License 列表:

tiup cluster license list
Activated TiDB fusion instance count: 2 Total instance quota of licenses authorized: 0 Activate cluster: - tidbx1 - tidbx2 SerialNumber CommonName ProductSeries ExpiresAt Validity Quota ------------ ---------- ------------- --------- -------- ----- dQaYxKCVxXhPhRYOxIQJLXLgkw6 Target Cert Example 5 TiDBX 2025-06-29 Expired 2

关注到序列号为 dQaYxKCVxXhPhRYOxIQJLXLgkw6 的 License 已经过期,可以执行如下命令,删除过期的 License:

tiup cluster license remove <license-serial-number>

以上命令中:

  • <license-serial-number>为 License 的序列号,示例中为dQaYxKCVxXhPhRYOxIQJLXLgkw6

License 过期的功能限制

当 License 过期时,会限制以下 TiUP 命令的使用:

  • clean
  • disable
  • edit_config
  • enable
  • exec
  • patch
  • prune
  • reload
  • rename
  • restart
  • scale_out
  • start
  • stop
  • tls
  • upgrade

当 License 过期后,以上操作均会报错 Error: TiDB fusion cluster <cluster-name> is not activated