tidb 安装过程遇到的问题

3 篇文章 0 订阅

今天在做tidb 集群搭建的时候,因为有些机器是从其他测试环境拼凑过来的,ansible 安装的时候出现了一下问题

[tidb@pg01 tidb-ansible]$ ansible-playbook bootstrap.yml

查了资料说是有机器的内核版本过低,去查了一下,果然 centos 7.2版本内核是3.10

[root@pg01 ~]# uname -ra
Linux pg01 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
 

去看看别人的怎么升级内核的

1)#导入ELRepo软件仓库的公共秘钥

[root@pg03 tidb]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

 

2)#安装ELRepo软件仓库的yum源

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

[root@pg02 tidb]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
Retrieving http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:elrepo-release-7.0-3.el7.elrepo  ################################# [100%]
 

3)#安装主线内核(ml=mainline)4.14.11

[root@pg02 tidb]# yum --enablerepo=elrepo-kernel install kernel-ml

 

4)查看系统可用内核,并设置启动项

[root@pg02 tidb]#  awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : CentOS Linux (5.5.8-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-1062.12.1.el7.x86_64) 7 (Core)
2 : CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
3 : CentOS Linux (0-rescue-0852214a962847948cbf25e8b110673f) 7 (Core)
 

机器上存在 3个内核,我们要使用5.5.8 这个版本,可以通过 

[root@pg02 tidb]#  grub2-set-default 0 

 

生成 grub 配置文件

grub2-mkconfig -o /boot/grub2/grub.cfg

 

5)重启系统,并验证

[root@pg03 ~]# reboot

等操作系统起来

[root@pg03 ~]# uname -ra
Linux pg03 5.5.8-1.el7.elrepo.x86_64 #1 SMP Tue Mar 3 18:13:28 EST 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@pg03 ~]# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
 

升级内核参考了别人的文章



 

ERROR MESSAGE SUMMARY ********************************************************************************************************************************************************************************************************************************************************
[10.10.103.90]: Ansible FAILED! => playbook: bootstrap.yml; TASK: check_system_optional : Preflight check - Check TiDB server's CPU; message: {"changed": false, "msg": "This machine does not have sufficient CPU to run TiDB, at least 8 cores."}

说明tidb 对cpu的消耗比较高,cpu至少要8核

https://www.cnblogs.com/jinyuanliu/p/10368780.html#_label2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值