centos 7.2 安装测试 TIDB 2.0 集群 以及遇到的一些错误解决方式



hostnamectl set-hostname tidb1  ---修改主机名


systemctl stop firewalld.service 
systemctl disable firewalld.service
以及禁用SELINUX 






git clone -b release-2.0 https://github.com/pingcap/tidb-ansible.git
git clone -b release-1.0 https://github.com/pingcap/tidb-ansible.git






[root@tidb1 tidb-ansible]# cat /etc/hosts 
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.137.161 tidb1
192.168.137.162 tidb2
192.168.137.163 tidb3
192.168.137.164 tidb4
192.168.137.165 tidb5
192.168.137.166 tidb6






配置 ssh  


ssh-keygen  -t rsa 
ssh-copy-id -i root@192.168.137.161
ssh-copy-id -i root@192.168.137.162
ssh-copy-id -i root@192.168.137.163
ssh-copy-id -i root@192.168.137.164
ssh-copy-id -i root@192.168.137.165
ssh-copy-id -i root@192.168.137.166


ssh localhost 
ssh tidb1
ssh tidb2
ssh tidb3
ssh tidb4
ssh tidb5
ssh tidb6






scp -rp /etc/hosts tidb2:/etc/
scp -rp /etc/hosts tidb3:/etc/
scp -rp /etc/hosts tidb4:/etc/
scp -rp /etc/hosts tidb5:/etc/
scp -rp /etc/hosts tidb6:/etc/


[root@tidb1 tidb-ansible]# cd /etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo


[root@tidb1 ~]# yum install -y ansible 






参考文档
https://github.com/pingcap/docs-cn/blob/master/op-guide/ansible-deployment.md#如何使用-ansible-部署-ntp-服务


如何使用 Ansible 部署 NTP 服务


参照在中控机器上下载 TiDB-Ansible下载 TiDB-Ansible,将你的部署目标机器 IP 添加到 [servers] 区块下,ntp_server 变量的值 pool.ntp.org 可替换为其他 NTP server,在启动 NTP 服务前,系统会 ntpdate 该 NTP server,Ansible 安装的 NTP 服务使用安装包默认 server 列表,见配置文件 cat /etc/ntp.conf 中 server 参数。


$ vi hosts.ini
[servers]
192.168.137.164
192.168.137.165
192.168.137.166
192.168.137.161
192.168.137.162
192.168.137.163




[all:vars]
username = tidb
ntp_server = pool.ntp.org
执行以下命令,按提示输入部署目标机器 root 密码。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值