yum install -y yum-utils device-mapper-persistent-data lvm2html
[root@izm5e2q95pbpe1hh0kkwoiz ~]# yum install -y yum-utils device-mapper-persistent-data lvm2 已加載插件:fastestmirror base | 3.6 kB 00:00:00 bintray-rabbitmq-server | 1.3 kB 00:00:00 epel | 4.7 kB 00:00:00 extras ......
[root@izm5e2q95pbpe1hh0kkwoiz ~]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 已加載插件:fastestmirror adding repo from: http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo grabbing file http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo repo saved to /etc/yum.repos.d/docker-ce.repo
yum list docker-ce --showduplicates | sort -rjava
[root@izm5e2q95pbpe1hh0kkwoiz ~]# yum list docker-ce --showduplicates | sort -r 已加載插件:fastestmirror 可安裝的軟件包 Loading mirror speeds from cached hostfile docker-ce.x86_64 3:19.03.9-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.8-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.7-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.6-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.5-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.4-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.3-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.2-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.1-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.12-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.11-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.10-3.el7 docker-ce-stable docker-ce.x86_64 3:19.03.0-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.9-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.8-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.7-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.6-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.5-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.4-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.3-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.2-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.1-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable docker-ce.x86_64 18.06.3.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.2.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stable docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
yum install docker-ce-19.03.9python
root@izm5e2q95pbpe1hh0kkwoiz ~]# yum install docker-ce-19.03.9 已加載插件:fastestmirror Loading mirror speeds from cached hostfile 正在解決依賴關係 --> 正在檢查事務 ---> 軟件包 docker-ce.x86_64.3.19.03.9-3.el7 將被 安裝 --> 正在處理依賴關係 container-selinux >= 2:2.74,它被軟件包 3:docker-ce-19.03.9-3.el7.x86_64 須要 --> 正在處理依賴關係 containerd.io >= 1.2.2-3,它被軟件包 3:docker-ce-19.03.9-3.el7.x86_64 須要 --> 正在處理依賴關係 docker-ce-cli,它被軟件包 3:docker-ce-19.03.9-3.el7.x86_64 須要 --> 正在處理依賴關係 libcgroup,它被軟件包 3:docker-ce-19.03.9-3.el7.x86_64 須要 ...... 做爲依賴被升級: audit.x86_64 0:2.8.5-4.el7 audit-libs.x86_64 0:2.8.5-4.el7 libselinux.x86_64 0:2.5-15.el7 libselinux-devel.x86_64 0:2.5-15.el7 libselinux-python.x86_64 0:2.5-15.el7 libselinux-utils.x86_64 0:2.5-15.el7 libsemanage.x86_64 0:2.5-14.el7 libsepol.x86_64 0:2.5-10.el7 libsepol-devel.x86_64 0:2.5-10.el7 policycoreutils.x86_64 0:2.5-34.el7 selinux-policy.noarch 0:3.13.1-266.el7 selinux-policy-targeted.noarch 0:3.13.1-266.el7 完畢!
[root@izm5e2q95pbpe1hh0kkwoiz ~]# docker -v Docker version 19.03.12, build 48a66213fe [root@izm5e2q95pbpe1hh0kkwoiz ~]# docker version Client: Docker Engine - Community Version: 19.03.12 API version: 1.40 Go version: go1.13.10 Git commit: 48a66213fe Built: Mon Jun 22 15:46:54 2020 OS/Arch: linux/amd64 Experimental: false Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@izm5e2q95pbpe1hh0kkwoiz ~]# docker -v Docker version 19.03.12, build 48a66213fe root@izm5e2q95pbpe1hh0kkwoiz ~]# docker version Client: Docker Engine - Community Version: 19.03.12 API version: 1.40 Go version: go1.13.10 Git commit: 48a66213fe Built: Mon Jun 22 15:46:54 2020 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.9 API version: 1.40 (minimum version 1.12) Go version: go1.13.10 Git commit: 9d988398e7 Built: Fri May 15 00:24:05 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-\((uname -s)-\)(uname -m)" -o /usr/local/bin/docker-composelinux
sudo chmod +x /usr/local/bin/docker-composegit
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-composegithub
docker-compose --versiondocker
yum -y install epel-release yum -y install python-pip
pip --version 或 pip -V
pip install --upgrade pip
pip install docker-compose
docker-compose version
Cannot uninstall ‘requests’. It is adistutils installed project and thus we cannot accurately determine which filesbelong to it which would lead to only a partial uninstall.windows
解決方法centos
pip install docker-compose--ignore-installed requests
沒有任何錯誤,會出現安裝成功界面app
https://github.com/docker/compose/releases/download/1.26.0/docker-compose-Linux-x86_64
[root@izm5e2q95pbpe1hh0kkwoiz bin]# wget https://github.com/docker/compose/releases/download/1.26.0/docker-compose-Linux-x86_64 --2020-06-29 10:41:41-- https://github.com/docker/compose/releases/download/1.26.0/docker-compose-Linux-x86_64 正在解析主機 github.com (github.com)... 13.229.188.59 正在鏈接 github.com (github.com)|13.229.188.59|:443... 已鏈接。 ......
[root@izm5e2q95pbpe1hh0kkwoiz bin]# mv docker-compose-Linux-x86_64 docker-compose
# 添加可執行權限 sudo chmod +x /usr/local/bin/docker-compose # 查看docker-compose版本 docker-compose -v
http://www.javashuo.com/article/p-qqaozlxs-b.html