设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 重新 数据 创业者
当前位置: 首页 > 运营中心 > 建站资源 > 优化 > 正文

教你一次性成功安装K8S集群(基于一主两从模式)(2)

发布时间:2020-12-06 12:48 所属栏目:21 来源:网络整理
导读:exportREGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.comdnfinstallyum*yuminstall-yyum-utilsdevice-mapper-persistent-datalvm2yum-config-manager--add-repohttp://mirrors.aliyun.com/docker-ce/linu

export REGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.com dnf install yum* yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum install -y docker-ce-19.03.8 docker-ce-cli-19.03.8 containerd.io systemctl enable docker.service systemctl start docker.service docker version 

使用如下命令赋予auto_install_docker.sh文件可执行权限。

chmod a+x ./auto_install_docker.sh 

接下来,直接运行auto_install_docker.sh脚本文件安装Docker即可。

./auto_install_docker.sh 

2.配置阿里云镜像加速器

新建脚本文件aliyun_docker_images.sh。

vim aliyun_docker_images.sh 

文件内容如下所示。

(编辑:ASP站长网)

网友评论
推荐文章
    热点阅读