【Linux operation 27】麒麟信安操作系统 3.3 在线安装docker

编程入门 行业动态 更新时间:2024-10-10 23:25:05

【Linux operation 27】麒麟信安操作系统 3.3 <a href=https://www.elefans.com/category/jswz/34/1770935.html style=在线安装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

本文发布于:2024-02-25 12:39:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1698993.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:在线   麒麟   操作系统   operation   Linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!