tidb4.0.1安装
安装环境
3台redhat7.6 64 服务器
软硬件需求
系统要求
|Linux 操作系统平台 | 版本 |
|Red Hat Enterprise Linux | 7.3以上 |
| CentOS | 7.3以上 |
|Oracle Enterprise Linux | 7.3以上 |
|Ubuntu LTS | 16.04 及以上 |
软件需求
中控机需求
|软件| 版本|
|sshpass| 1.06 及以上|
|TiUP| 0.6.2 及以上|
目标主机需求
| 软件 | 版本 |
|sshpass | 1.06 及以上 |
|numa | 2.0.12 及以上 |
挂载参数
UUID=c51eb23b-195c-4061-92a9-3fad812cc12f /data1 ext4 defaults,nodelalloc,noatime 0 2
注:不加没有报错。网上说不加会报错
关闭swap
vim /etc/sysctl.conf
vm.swappiness = 0
关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
配置和安装NTP
参考官方文档
配置ssh**和sudo免密码
visudo
tidb ALL=(ALL) NOPASSWD: ALL
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.0.1.1
以上所有节点都配置
安装tidb
使用离线包安装
tidb-community-server-v4.0.1-linux-amd64.tar.gz
tar zxf tidb-community-server-v4.0.1-linux-amd64.tar.gz
安装tiup
cd tidb-community-server-v4.0.1-linux-amd64
sh local_install.sh
source /root/.bash_profile
配置初始化参数
新建topology.yaml文件
vim topology.yaml
global:
user: "tidb"
ssh_port: 22
deploy_dir: "/data/tidb-deploy"
data_dir: "/data/tidb-data"
monitored:
node_exporter_port: 9100
blackbox_exporter_port: 9115
server_configs:
tidb:
log.slow-threshold: 300
binlog.enable: false
binlog.ignore-error: false
tikv:
server.grpc-concurrency: 8
raftstore.apply-pool-size: 2
raftstore.store-pool-size: 2
rocksdb.max-sub-compactions: 2
storage.block-cache.capacity: "16GB"
readpool.unified.max-thread-count: 16
readpool.storage.use-unified-pool: false
readpool.coprocessor.use-unified-pool: true
pd:
schedule.leader-schedule-limit: 4
schedule.region-schedule-limit: 2048
schedule.replica-schedule-limit: 64
replication.enable-placement-rules: true
tiflash:
path_realtime_mode: false
logger.level: "info"
tiflash-learner:
log-level: "info"
raftstore.apply-pool-size: 4
raftstore.store-pool-size: 4
pump:
gc: 7
pd_servers:
- host: 10.105.1.10
- host: 10.105.1.103
- host: 10.105.1.171
tidb_servers:
- host: 10.105.1.10
- host: 10.105.1.103
- host: 10.105.1.171
tikv_servers:
- host: 10.105.1.10
- host: 10.105.1.103
- host: 10.105.1.171
tiflash_servers:
- host: 10.105.1.10
#pump_servers:
# - host: 10.0.1.17
# ssh_port: 22
# port: 8250
# deploy_dir: "/tidb-deploy/pump-8249"
# data_dir: "/tidb-data/pump-8249"
# log_dir: "/tidb-deploy/pump-8249/log"
# numa_node: "0,1"
# # The following configs are used to overwrite the `server_configs.drainer` values.
# config:
# gc: 7
# - host: 10.0.1.18
# - host: 10.0.1.19
# drainer_servers:
# - host: 10.0.1.17
# port: 8249
# data_dir: "/tidb-data/drainer-8249"
# # If drainer doesn't have a checkpoint, use initial commitTS as the initial checkpoint.
# # Will get a latest timestamp from pd if commit_ts is set to -1 (the default value).
# commit_ts: -1
# deploy_dir: "/tidb-deploy/drainer-8249"
# log_dir: "/tidb-deploy/drainer-8249/log"
# numa_node: "0,1"
# # The following configs are used to overwrite the `server_configs.drainer` values.
# config:
# syncer.db-type: "mysql"
# syncer.to.host: "127.0.0.1"
# syncer.to.user: "root"
# syncer.to.password: ""
# syncer.to.port: 3306
# syncer.ignore-table:
# - db-name: test
# tbl-name: log
# - db-name: test
# tbl-name: audit
# - host: 10.0.1.19
# cdc_servers:
# - host: 10.0.1.20
# ssh_port: 22
# port: 8300
# deploy_dir: "/tidb-deploy/cdc-8300"
# log_dir: "/tidb-deploy/cdc-8300/log"
# numa_node: "0,1"
# - host: 10.0.1.21
# - host: 10.0.1.22
monitoring_servers:
- host: 10.105.1.10
grafana_servers:
- host: 10.105.1.10
alertmanager_servers:
- host: 10.105.1.10
部署集群
export TIUP_MIRRORS=/root/tidb-server --tidb安装包解压路径
tiup cluster deploy tidb-test v4.0.1 topology.yaml --user tidb [-p] [-i /home/root/.ssh/gcp_rsa] --没有配置免密码,需要两个参数其中一个。tidb-test 集群名,v4.0.1 版本 tidb 系统用户,没有建,在执行这段命令,会自动创建
tiup cluster start tidb-test --启动集群
看到如下信息就表示成功
Deployed cluster tidb-test
successfully
上一篇: Oracle修改字段类型
下一篇: 雨滴,美丽的雨滴
推荐阅读
-
电脑安装ABBYY FineReader 12提示访问文件被拒绝的解决方法
-
mysql 5.7以上版本安装配置方法图文教程(mysql 5.7.12mysql 5.7.13mysql 5.7.14)
-
Wing FTP Server FTP服务器端中文版安装使用教程
-
Mysql5.7.17 winx64.zip解压缩版安装配置图文教程
-
ie9无法安装怎么解决?ie9无法安装解决图文教程
-
linux下mysql的安装步骤
-
windows系统mysql5.7.18安装图文教程
-
谷歌浏览器(chrome)的免费插件时空隧道安装与使用图文教程
-
详解在React项目中安装并使用Less(用法总结)
-
python3.4+pycharm 环境安装及使用方法