在线安装docker"/>
【Linux operation 27】麒麟信安操作系统 3.3 在线安装docker
1、查看系统内核:
[root@localhost yum.repos.d]# uname -r
3.10.0-1062.9.1.ky3.kb6.pg.x86_64
检测系统内核版本是 3.10.0,基于基于Centos7.9(内核:3.10.0-1160.e17.x86_64)
2、如果前安装过 docker,请先删掉
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
3、安装依赖
yum install -y yum-utils device-mapper-persistent-data lvm2
4、下载清华源的发行版下载repo文件
yum-config-manager --add-repo .repo
把软件仓库地址替换为 TUNA
sudo sed -i 's+download.docker+mirrors.tuna.tsinghua.edu/docker-ce+' /etc/yum.repos.d/docker-ce.repo
5、定义 yum 变量&修改 repo
修改 centos 和 docker repo文件中的 $releasever 为 centos_version ,原因是在麒麟服务器操作系统中 $releasever被修改为了 3,而我们需要使用 centos 7.9 的镜像源,如果不替换,基本上仓库的每一个地址都是404。
[root@localhost yum.repos.d]# yum repolist
已加载插件:langpacks
Repository base is listed more than once in the configuration
.xml: [Errno 14] HTTPS Error 404 - Not Found
正在尝试其它镜像。
To address this issue please refer to the below knowledge base article above article doesn't help to resolve this issue please use /..xml: [Errno 14] HTTPS Error 404 - Not Found
正在尝试其它镜像。
.xml: [Errno 14] HTTPS Error 404 - Not Found
正在尝试其它镜像。
.xml: [Errno 14] HTTPS Error 404 - Not Found
正在尝试其它镜像。
源标识 源名称 状态
base/3/x86_64 CentOS-3 - Base 0
extras/3/x86_64 CentOS-3 - Extras 0
updates/3/x86_64 CentOS-3 - Updates 0
repolist: 0
您在 /var/spool/mail/root 中有邮件
未修改的docker-ce.repo文件
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=[docker-ce-stable-debuginfo]
name=Docker CE Stable - Debuginfo $basearch
baseurl=/$releasever/debug-$basearch/stable
enabled=0
gpgcheck=1
gpgkey=[docker-ce-stable-source]
name=Docker CE Stable - Sources
baseurl=/$releasever/source/stable
enabled=0
gpgcheck=1
gpgkey=[docker-ce-test]
name=Docker CE Test - $basearch
baseurl=/$releasever/$basearch/test
enabled=0
gpgcheck=1
gpgkey=[docker-ce-test-debuginfo]
name=Docker CE Test - Debuginfo $basearch
baseurl=/$releasever/debug-$basearch/test
enabled=0
gpgcheck=1
gpgkey=[docker-ce-test-source]
name=Docker CE Test - Sources
baseurl=/$releasever/source/test
enabled=0
gpgcheck=1
gpgkey=[docker-ce-nightly]
name=Docker CE Nightly - $basearch
baseurl=/$releasever/$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=[docker-ce-nightly-debuginfo]
name=Docker CE Nightly - Deb
更多推荐
【Linux operation 27】麒麟信安操作系统 3.3 在线安装docker
发布评论