TiDB数据库的安装配置

一、 TiDB 软件和硬件环境建议配置

Linux 操作系统版本要求

Linux 操作系统

版本

Red Hat Enterprise Linux

7.3 及以上的 7.x 版本

CentOS

7.3 及以上的 7.x 版本

Oracle Enterprise Linux

7.3 及以上的 7.x 版本

Amazon Linux

2

Ubuntu LTS

16.04 及以上的版本

软件配置要求

     中控机软件配置

软件

版本

sshpass

1.06 及以上

TiUP

1.5.0 及以上

     目标主机建议配置软件

软件

版本

sshpass

1.06 及以上

numa

2.0.12 及以上

tar

任意

    开发及测试环境

组件

CPU

内存

本地存储

网络

实例数量(最低要求)

TiDB

8 +

16 GB+

无特殊要求

千兆网卡

1(可与 PD 同机器)

PD

4 +

8 GB+

SAS, 200 GB+

千兆网卡

1(可与 TiDB 同机器)

TiKV

8 +

32 GB+

SSD, 200 GB+

千兆网卡

3

TiFlash

32 +

64 GB+

SSD, 200 GB+

千兆网卡

1

TiCDC

8 +

16 GB+

SAS, 200 GB+

千兆网卡

1

     生产环境

组件

CPU

内存

硬盘类型

网络

实例数量(最低要求)

TiDB

16 +

48 GB+

SAS

万兆网卡(2 块最佳)

2

PD

8 +

16 GB+

SSD

万兆网卡(2 块最佳)

3

TiKV

16 +

64 GB+

SSD

万兆网卡(2 块最佳)

3

TiFlash

48 +

128 GB+

1 or more SSDs

万兆网卡(2 块最佳)

2

TiCDC

16 +

64 GB+

SSD

万兆网卡(2 块最佳)

2

监控

8 +

16 GB+

SAS

千兆网卡

1

     磁盘空间要求

组件

磁盘空间要求

健康水位使用率

TiDB

日志盘建议最少预留 30 GB

低于 90%

PD

数据盘和日志盘建议最少各预留 20 GB

低于 90%

TiKV

数据盘和日志盘建议最少各预留 100 GB

低于 80%

TiFlash

数据盘建议最少预留 100 GB,日志盘建议最少预留 30 GB

低于 80%

TiUP

中控机:部署一个版本的 TiDB 集群占用不超过 1 GB 空间,部署多个版本集群所占用的空间会相应增加

部署服务器(实际运行 TiDB 各组件的机器):TiFlash 占用约 700 MB 空间,其他组件(PDTiDBTiKV 等)各占用约 200 MB 空间。同时,部署过程会占用小于 1 MB 临时空间(/tmp)存放临时文件

不涉及

Ngmonitoring

Conprof3 x 1 GB x 组件数量(表示每个组件每天占用约 1 GB,总共 3 天) + 20 GB 预留空间

Top SQL30 x 50 MB x 组件数量(每个组件每天占用约 50 MB,总共 30 天)

Top SQL Conprof 共享预留空间

不涉及

离线安装

下载安装包

https://download.pingcap.org/tidb-community-server-v6.1.0-linux-amd64.tar.gz

安装tiup

[root@bcm01 ~]# tar -xzf tidb-community-server-v6.1.0-linux-amd64.tar.gz

[root@bcm01 ~]# cd tidb-community-server-v6.1.0-linux-amd64

[root@bcm01 tidb-community-server-v6.1.0-linux-amd64]# ./local_install.sh

制作yaml集群文件 xxx-main-new.yaml

环境检查处理

tiup cluster check ./xxx-main-new.yaml --apply --user root

没有错误后,安装集群

tiup cluster deploy tidb-xxx v6.1.0 ./xxx-main.yaml --user root -p

安装完成后你就得到一个tidb集群了,第一次启动,初始化

tiup cluster start tidb-xxx --init

后续只需要

tiup cluster start tidb-xxx

停止集群

tiup cluster stop tidb-xxx

其他tiup操作

TiUP 命令概览 | PingCAP 文档中心

监控的登录方式

http://192.168.xxx.xxx:2379/dashboard/#/cluster_info/host

http://192.168.xxx.xxx:3000/dashboard/new

mysql登录方式

mysql -u root -p -P 4000 -h tidb-server

TiiDB官方文档网站:

https://docs.pingcap.com/zh/tidb/stable/overview

你可能感兴趣的:(TiDB数据库,tidb,数据库)