基于centos8_x
1.yum方式安装
- 获取阿里源
shell
wget -o /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
wget -o /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
- 安装
shell
yum install -y containerd.io
yum install -y containerd.io
2.配置文件
- 生成配置文件
shell
mkdir /etc/containerd -p
#生成配置文件
containerd config default>/etc/containerd/config.toml
mkdir /etc/containerd -p
#生成配置文件
containerd config default>/etc/containerd/config.toml
- 编辑配置文件
#编辑配置文件
vim /etc/containerd/config.toml
Systemdcgroup = false 改为 Systemdcgroup = true
sandbox_image = "registry.aliyuncs.com/google_containers/pause:3.9"
#编辑配置文件
vim /etc/containerd/config.toml
Systemdcgroup = false 改为 Systemdcgroup = true
sandbox_image = "registry.aliyuncs.com/google_containers/pause:3.9"
3.启动
shell
systemctl enable containerd
systemctl start containerd
systemctl enable containerd
systemctl start containerd