TiDB v7.5.4安装部署手册
1 安装部署计划
服务器名称 | ip | 角色 |
---|---|---|
hdp-01 | 172.16.4.121 | pd_servers、tidb_servers、tikv_servers |
hdp-02 | 172.16.4.122 | pd_servers、tidb_servers、tikv_servers |
hdp-03 | 172.16.4.123 | pd_servers、tidb_servers、tikv_servers |
hdp-04 | 172.16.4.124 | monitoring_servers、grafana_servers、alertmanager_servers |
2 相关参考信息
-
安装部署包下载地址
- https://download.pingcap.org/tidb-community-server-v7.5.4-linux-arm64.tar.gz
-
安装部署官方手册
- https://docs.pingcap.com/zh/tidb/v7.5/tiup-cluster-topology-reference
3 安装部署TiDB
3.1 下载安装部署包
将tidb-community-server-v7.5.4-linux-arm64.tar.gz上传至hdp-01服务器上
mkdir /data/tidb
cd /data/tidb
wget https://download.pingcap.org/tidb-community-server-v7.5.4-linux-arm64.tar.gz
tar -xvf tidb-community-server-v7.5.4-linux-arm64.tar.gz
3.2 tidb用户
3.2.1 增加tidb用户及配置相关密码
#hdp-01、hdp-02、hdp-03、hdp-04
useraddr tidb
passwd tidb
3.2.2 tidb用户免密
#hdp-01
[tidb@hdp-01 ~]$ su - tidb
[tidb@hdp-01 ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/tidb/.ssh/id_rsa):
Created directory '/home/tidb/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/tidb/.ssh/id_rsa.
Your public key has been saved in /home/tidb/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:jpI7fXb+P79Gae0EFQnrNCtr6i+LLbFmJX4MVJO4ybg tidb@hdp-warehouse-001
The key's randomart image is:
+---[RSA 2048]----+
| . . ...o|
| . + ...|
| o + . + . |
| . = o + |
| o S . o .o|
| E * . o +o|
| o.o O o oo |
| .o.*=++ ...|
| ..o++B=o..o+o|
+----[SHA256]-----+
[tidb@hdp-01 ~]$ ssh-copy-id hdp-01
[tidb@hdp-01 ~]$ ssh-copy-id hdp-02
[tidb@hdp-01 ~]$ ssh-copy-id hdp-03
[tidb@hdp-01 ~]$ ssh-copy-id hdp-04
3.3.3 配置sudo权限
#hdp-01、hdp-02、hdp-03、hdp-04
# 在/etc/sudoers添加下列条目
tidb ALL=(ALL) NOPASSWD:ALL
3.3 部署TiUP环境
# hdp-01
[root@hdp-warehouse-001 tidb-community-server-v7.5.4-linux-arm64]# sh local_install.sh
Disable telemetry success
Successfully set mirror to /data/tidb/tidb-community-server-v7.5.4-linux-arm64
Detected shell: bash
Shell profile: /root/.bash_profile
/root/.bash_profile has been modified to to add tiup to PATH
open a new terminal or source /root/.bash_profile to use it
Installed path: /root/.tiup/bin/tiup
===============================================
1. source /root/.bash_profile
2. Have a try: