Linux CentOS stream 9 安装docker

在计算机技术中,虑拟化是一种资源管理技术,是将计算机的各种实体资源(CPU、内存、磁盘空间、网络适配器等),予以抽象、转换后呈现出来并可供分区、组合为一个或多个电脑配置环境。

目前,大多数服务器的容量的利用率不足15%,这导致服务器数量激增以及增加了复杂性。服务器虚拟化可以解决这些效率问题:

  • 服务器资利用事提升80%
  • 资金和运维成本节省高达50%
  • 更高的服务器整合率

Docker是基于Google公司推出的Golang语言开发而来,基于Linux内核的Cgroups、NameSpace,以及Union FS等技术,对进程进行封装隔离,属于操作系统层面的虚拟化技术。

核心概念

1)镜像images,事先做好一些基础功能(软件),可以用镜像来创建容器

2)容器container

3)仓库repository

docker应用示意图如下:

Docker引擎主要有两个版本:企业版(EE)和社区版(CE)。

每个季度企业版和社区版都会发布一个稳定版本(Stable)。社区版本会提供4个月的支持,而企业版本会提供12个月的支持。

学习与训练以docker-ce为主,本文重点讨论社区版在centos stream 9上的安装。

一、环境设置

1.国内yum仓库源

在centos stream 9系统中,原系统配置的是国外yum源,受网速的影响,必须配置国内yum源。常用的主流仓库源包括阿里云、清华源、中科大等提供的。

a.基础yum源

在/etc/yum.repos.d/中配置的CentOS-Base.repo如下:

# CentOS-Base.repo

#

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client.  You should use this for CentOS updates

# unless you are manually picking other mirrors.

#

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

#

#

[base]

name=CentOS-$releasever - Base - mirrors.aliyun.com

#failovermethod=priority

baseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/os/

        http://mirrors.aliyuncs.com/centos-stream/$stream/BaseOS/$basearch/os/

        http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/BaseOS/$basearch/os/

gpgcheck=1

gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official

#additional packages that may be useful

#[extras]

#name=CentOS-$releasever - Extras - mirrors.aliyun.com

#failovermethod=priority

#baseurl=https://mirrors.aliyun.com/centos-stream/$stream/extras/$basearch/os/

#        http://mirrors.aliyuncs.com/centos-stream/$stream/extras/$basearch/os/

#        http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/extras/$basearch/os/

#gpgcheck=1

#gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus - mirrors.aliyun.com

#failovermethod=priority

baseurl=https://mirrors.aliyun.com/centos-stream/$stream/centosplus/$basearch/os/

        http://mirrors.aliyuncs.com/centos-stream/$stream/centosplus/$basearch/os/

        http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/centosplus/$basearch/os/

gpgcheck=1

enabled=0

gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official

<
  • 10
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qq_36142959

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值