由於Harbor有1.8后和前的配置不一樣,決定先安裝1.8,結果報錯如下
[root@localhost harbor]# ./install.sh [Step 0]: checking installation environment ... ✖ Need to upgrade docker package to 17.06.0+.
對docker的版本要求較高,決定先卸載之前的docker
[root@topcheer harbor]# docker --version Docker version 1.13.1, build 7f2769b/1.13.1 [root@topcheer harbor]# ./install.sh [Step 0]: checking installation environment ... ✖ Need to upgrade docker package to 17.06.0+.
開始卸載
[root@topcheer harbor]# yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine 已加載插件:fastestmirror, langpacks 參數 docker-client-latest 沒有匹配 參數 docker-latest 沒有匹配 參數 docker-latest-logrotate 沒有匹配 參數 docker-logrotate 沒有匹配 參數 docker-engine 沒有匹配 正在解決依賴關系 --> 正在檢查事務 ---> 軟件包 container-selinux.noarch.2.2.107-3.el7 將被 刪除 ---> 軟件包 docker.x86_64.2.1.13.1-103.git7f2769b.el7.centos 將被 刪除 ---> 軟件包 docker-client.x86_64.2.1.13.1-103.git7f2769b.el7.centos 將被 刪除 ---> 軟件包 docker-common.x86_64.2.1.13.1-103.git7f2769b.el7.centos 將被 刪除 --> 解決依賴關系完成 依賴關系解決 ===================================================================================================================================================== Package 架構 版本 源 大小 ===================================================================================================================================================== 正在刪除: container-selinux noarch 2:2.107-3.el7 @extras 40 k docker x86_64 2:1.13.1-103.git7f2769b.el7.centos @extras 65 M docker-client x86_64 2:1.13.1-103.git7f2769b.el7.centos @extras 13 M docker-common x86_64 2:1.13.1-103.git7f2769b.el7.centos @extras 4.4 k 事務概要 ===================================================================================================================================================== 移除 4 軟件包 安裝大小:77 M 是否繼續?[y/N]:y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction 正在刪除 : 2:docker-1.13.1-103.git7f2769b.el7.centos.x86_64 1/4 警告:/etc/sysconfig/docker-storage 已另存為 /etc/sysconfig/docker-storage.rpmsave 正在刪除 : 2:docker-client-1.13.1-103.git7f2769b.el7.centos.x86_64 2/4 正在刪除 : 2:docker-common-1.13.1-103.git7f2769b.el7.centos.x86_64 3/4 正在刪除 : 2:container-selinux-2.107-3.el7.noarch 4/4 驗證中 : 2:docker-common-1.13.1-103.git7f2769b.el7.centos.x86_64 1/4 驗證中 : 2:docker-1.13.1-103.git7f2769b.el7.centos.x86_64 2/4 驗證中 : 2:container-selinux-2.107-3.el7.noarch 3/4 驗證中 : 2:docker-client-1.13.1-103.git7f2769b.el7.centos.x86_64 4/4 刪除: container-selinux.noarch 2:2.107-3.el7 docker.x86_64 2:1.13.1-103.git7f2769b.el7.centos docker-client.x86_64 2:1.13.1-103.git7f2769b.el7.centos docker-common.x86_64 2:1.13.1-103.git7f2769b.el7.centos 完畢!
安裝新的docker,首先要先update一下,不然后面會報錯
[root@topcheer harbor]# systemctl restart docker.service Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. [root@topcheer harbor]# sudo yum update
最后在開始正式安裝
[root@topcheer harbor]# yum install -y yum-utils 已加載插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.tuna.tsinghua.edu.cn 正在解決依賴關系 --> 正在檢查事務 ---> 軟件包 yum-utils.noarch.0.1.1.31-50.el7 將被 升級 ---> 軟件包 yum-utils.noarch.0.1.1.31-52.el7 將被 更新 --> 解決依賴關系完成 依賴關系解決 [root@topcheer harbor]# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 已加載插件:fastestmirror, langpacks adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo grabbing file https://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 [root@topcheer harbor]# yum list docker-ce --showduplicates|sort -r 已加載插件:fastestmirror, langpacks 可安裝的軟件包 * updates: mirrors.tuna.tsinghua.edu.cn Loading mirror speeds from cached hostfile * extras: mirrors.tuna.tsinghua.edu.cn 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 ..... [root@topcheer harbor]# yum install docker-ce-17.06.2.ce-1.el7.centos 已加載插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.tuna.tsinghua.edu.cn 正在解決依賴關系 --> 正在檢查事務 ---> 軟件包 docker-ce.x86_64.0.17.06.2.ce-1.el7.centos 將被 安裝 --> 正在處理依賴關系 container-selinux >= 2.9,它被軟件包 docker-ce-17.06.2.ce-1.el7.centos.x86_64 需要 --> 正在檢查事務 ---> 軟件包 container-selinux.noarch.2.2.107-3.el7 將被 安裝 --> 解決依賴關系完成