1、使yum的CentOS-Extras配置生效
檔案CentOS-Base.repo中enabled的値從0變成1
vim /etc/yum.repos.d/CentOS-Base.repo
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
※Docker is included by default in the CentOS-Extras repository
2、執行yum 安裝
# yum install docker
3、Docker啟動
# systemctl start docker
1、使yum的CentOS-Extras配置生效
檔案CentOS-Base.repo中enabled的値從0變成1
vim /etc/yum.repos.d/CentOS-Base.repo
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
※Docker is included by default in the CentOS-Extras repository
2、執行yum 安裝
# yum install docker
3、Docker啟動
# systemctl start docker