TiDBv6.5离线部署

作者: gykj-sunzl 原文来源: https://tidb.net/blog/42905e3c

1.环境与配置检查

1.1文件系统检查(类型和挂载参数)-TiKV节点

TiDBv6.5离线部署_第1张图片

mount -l

图片2.png

vim /etc/fstab

TiDBv6.5离线部署_第2张图片

重新挂载后查看已生效

TiDBv6.5离线部署_第3张图片

1.2swap检查

cat /etc/sysctl.conf |grep swap

1.3关闭防火墙

TiDBv6.5离线部署_第4张图片

1.4 NTP服务检查

73.134.35.233 NTP server端

vim /etc/ntp.conf

TiDBv6.5离线部署_第5张图片

client端

vim /etc/ntp.conf

TiDBv6.5离线部署_第6张图片

TiDBv6.5离线部署_第7张图片

1.5 操作系统优化

透明大页开启状态

图片9.png

磁盘I/O调度器

TiDBv6.5离线部署_第8张图片

磁盘标识

图片11.png

节能策略

图片12.png

修改配置

TiDBv6.5离线部署_第9张图片

vim /etc/tuned/virtual-guest-tidb-oprimal/tuned.conf

tuned-adm profile virtual-guest-tidb-oprimal

TiDBv6.5离线部署_第10张图片

sysctl.conf和limits.conf

TiDBv6.5离线部署_第11张图片

vim /etc/security/limits.conf

TiDBv6.5离线部署_第12张图片

1.6 SSH互信和sudo免密

不用root用户,创建tidb用户进行部署,配置ssh互信和sudo免密

useradd tidb

passwd tidb

Visudo

tidb ALL=(ALL) NOPASSWD: ALL

ssh-keygen -t rsa

ssh-copy-id -i ~/.ssh/id_rsa.pub 73.134.35.125

验证

ssh 73.134.35.125

sudo -su root

2. 部署最小拓扑结构

Ip 实例
73.134.35.233 TiDB、PD
73.134.35.55 TiKV
73.134.35.109 TiKV、Grafana
73.134.35.120 TiKV、Monitoring
73.134.35.171 TiFlash

3. 离线部署

/data目录下执行,镜像目录正确

TiDBv6.5离线部署_第13张图片

合并离线包

cd tidb-community-server-v6.5.0-linux-amd64/

cp -rp keys ~/.tiup/

tiup mirror merge ../tidb-community-toolkit-v6.5.0-linux-amd64

使用TiFlash部署拓扑的配置模板complex-tiflash.yml

检查风险

tiup cluster check /data/tidb/complex-tiflash.yml --user tidb -p

自动修复集群存在的潜在风险

tiup cluster check ./topology.yaml --apply --user tidb -p

部署集群

tiup cluster deploy tidb-test v6.0.0 /data/tidb/complex-tiflash.yml --user tidb -p

TiDBv6.5离线部署_第14张图片

TiDBv6.5离线部署_第15张图片

检查集群情况

tiup cluster list

TiDBv6.5离线部署_第16张图片

启动集群(安全启动)

tiup cluster start tidb-test --init

root/14CS8B3@m$Pa&9t6n+

TiDBv6.5离线部署_第17张图片

4. 验证

验证集群状态

tiup cluster display tidb-test

TiDBv6.5离线部署_第18张图片

Sqlyog登录验证

TiDBv6.5离线部署_第19张图片

Grafana登录

http://73.134.35.109:3000/login admin/admin

TiDBv6.5离线部署_第20张图片

Alertmanage

http://73.134.35.109:9093

TiDBv6.5离线部署_第21张图片

Prometheus

http://73.134.35.120:9090

TiDBv6.5离线部署_第22张图片

Dashboard

tiup cluster display tidb-test --dashboard

图片27.png

无法打开。。。

TiDBv6.5离线部署_第23张图片

经排查,升级chrome版本后解决

你可能感兴趣的:(vim,linux,服务器,centos,编辑器)