安装docker(主节点+工作节点)

# 1.先安装yml
yum install -y yum-utils device-mapper-persistent-data lvm2
# 2.设置阿里云镜像
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

# 3.查看可安装的docker版本
yum list docker-ce --showduplicates | sort -r

#4. 安装docker
yum install docker-ce-19.03.9-3.el7 docker-ce-cli-19.03.9-3.el7

#5. 查看docker版本
docker -v

#配置开机自启动
systemctl enable docker.service

#6. 启动docker
systemctl start docker

#7. 查看docker 启动状态
systemctl status docker

 配置阿里云镜像源(主节点+工作节点)

cat > /etc/yum.repos.d/kubernetes.repo << EOF
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF<
07-11 06:54