Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3492986
  • 博文数量: 738
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(738)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客

分类: Mysql/postgreSQL

2021-03-03 22:45:47


找一台16g内存的笔记本电脑或台式机
预装了windows 10 64位操作系统


安装vmware workstation 15.5.2
下载centos 7.7操作系统安装文件
创建4台虚拟机,挂载centos安装文件


点击(此处)折叠或打开

  1. 进入虚拟机,挂载光驱
  2. mount -r /dev/sr0 /mnt

  3. 配置yum源
  4. cat > /etc/yum.repos.d/yum.repo<<EOF
  5. [source]
  6. name=yumserver
  7. baseurl=file:///mnt
  8. gpgcheck=0

  9. [epel]
  10. name=Extra Packages for Enterprise Linux 7 - $basearch
  11. baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
  12. #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
  13. failovermethod=priority
  14. enabled=1
  15. gpgcheck=0

  16. EOF

  17. ------------开始安装Tidb---------------

  18. yum -y install epel-release git curl sshpass
  19. yum -y install python2-pip

  20. useradd -m tidb
  21. echo 'tidb' | passwd tidb --stdin

  22. visudo 追加到末尾
  23. tidb ALL=(ALL) NOPASSWD: ALL

  24. su - tidb
  25. ssh-keygen -t rsa
  26. git clone -b v3.0.1 https://github.com/pingcap/tidb-ansible.git

  27. cd /home/tidb/tidb-ansible
  28. sudo pip install -r ./requirements.txt


点击(此处)折叠或打开

  1. 报错了吧,提示pip版本低
  2. 按提示执行pip install --upgrade pip
  3. 执行刚才的安装requirements.txt里内容,又报错了吧,大写的尴尬扑面而来

  4. 原因是pip不支持python2.7了,解决方法
  5. curl https://bootstrap.pypa.io/2.7/get-pip.py --output get-pip.py
  6. python get-pip.py

  7. 继续执行刚才的(以tidb用户)
  8. /home/tidb/tidb-ansible
  9. sudo pip install -r ./requirements.txt

  10. ansible --version
  11. 2.7.11



阅读(1666) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~