找一台16g内存的笔记本电脑或台式机
预装了windows 10 64位操作系统
安装vmware workstation 15.5.2
下载centos 7.7操作系统安装文件
创建4台虚拟机,挂载centos安装文件
-
进入虚拟机,挂载光驱
-
mount -r /dev/sr0 /mnt
-
-
配置yum源
-
cat > /etc/yum.repos.d/yum.repo<<eof
-
[source]
-
name=yumserver
-
baseurl=file:///mnt
-
gpgcheck=0
-
-
[epel]
-
name=extra packages for enterprise linux 7 - $basearch
-
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
-
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
-
failovermethod=priority
-
enabled=1
-
gpgcheck=0
-
-
eof
-
-
------------开始安装tidb---------------
-
-
yum -y install epel-release git curl sshpass
-
yum -y install python2-pip
-
-
useradd -m tidb
-
echo 'tidb' | passwd tidb --stdin
-
-
visudo 追加到末尾
-
tidb all=(all) nopasswd: all
-
-
su - tidb
-
ssh-keygen -t rsa
-
git clone -b v3.0.1 https://github.com/pingcap/tidb-ansible.git
-
-
cd /home/tidb/tidb-ansible
-
sudo pip install -r ./requirements.txt
-
报错了吧,提示pip版本低
-
按提示执行pip install --upgrade pip
-
执行刚才的安装requirements.txt里内容,又报错了吧,大写的尴尬扑面而来
-
-
原因是pip不支持python2.7了,解决方法
-
curl https://bootstrap.pypa.io/2.7/get-pip.py --output get-pip.py
-
python get-pip.py
-
-
继续执行刚才的(以tidb用户)
-
/home/tidb/tidb-ansible
-
sudo pip install -r ./requirements.txt
-
-
ansible --version
-
2.7.11
阅读(1620) | 评论(0) | 转发(0) |