在当今数码时代,数据库已成为许多企业和组织的重要组成部分。为了满足日益增长的需求,许多新型数据库系统也应运而生。TiDB是一种新型的分布式数据库系统,其特点是高可用性和可扩展性。本文将介绍如何快速安装TiDB。
安装TiDB的第一步是下载二进制包。您可以在TiDB的官方网站上找到最新的二进制包。下载后,将其解压缩到您选择的目录中。接下来,您需要配置TiDB集群。为了方便起见,我们建议使用TiUP工具来完成此操作。TiUP是一个用于管理TiDB集群的命令行工具,它可以帮助您快速部署和管理TiDB集群。
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
[root@shawnyan ~]# tiup -v
1.12.3 v1.12.2-nightly-9
Go Version: go1.19.10
Git Ref: master
GitHash: c3a7e3133e01bd36094a7016eed5adbd3c656c61
[root@shawnyan ~]#
安装TiUP后,您可以使用以下命令来安装TiDB集群:
[root@shawnyan ~]# tiup playground --host 192.168.8.171 --tag 7.1
tiup is checking updates for component playground ...
Starting component `playground`: /root/.tiup/components/playground/v1.12.3/tiup-playground --host 192.168.8.171 --tag 7.1
Using the version v7.1.0 for version constraint "".
If you'd like to use a TiDB version other than v7.1.0, cancel and retry with the following arguments:
Specify version manually: tiup playground <version>
Specify version range: tiup playground ^5
The nightly version: tiup playground nightly
Start pd instance:v7.1.0
The component `pd` version v7.1.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/pd-v7.1.0-linux-amd64.tar.gz 50.27 MiB / 50.27 MiB 100.00% 11.52 MiB/s
Start tikv instance:v7.1.0
The component `tikv` version v7.1.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/tikv-v7.1.0-linux-amd64.tar.gz 280.85 MiB / 280.85 MiB 100.00% 11.14 MiB/s
Start tidb instance:v7.1.0
The component `tidb` version v7.1.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/tidb-v7.1.0-linux-amd64.tar.gz 72.88 MiB / 72.88 MiB 100.00% 11.62 MiB/s
Waiting for tidb instances ready
192.168.8.171:4000 ... Done
The component `prometheus` version v7.1.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/prometheus-v7.1.0-linux-amd64.tar.gz 94.26 MiB / 94.26 MiB 100.00% 11.54 MiB/s
download https://tiup-mirrors.pingcap.com/grafana-v7.1.0-linux-amd64.tar.gz 50.12 MiB / 50.12 MiB 100.00% 11.77 MiB/s
Start tiflash instance:v7.1.0
The component `tiflash` version v7.1.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/tiflash-v7.1.0-linux-amd64.tar.gz 231.22 MiB / 231.22 MiB 100.00% 11.12 MiB/s
Waiting for tiflash instances ready
192.168.8.171:3930 ... Done
标签:TiDB,v7.1,--,tiup,MiB,version,体验
From: https://blog.51cto.com/u_15081581/6567748