首页 > 代码库 > 工作日记2017-02-22

工作日记2017-02-22

今天给一台服务器上的服务扩容,添加软连接,顺便打算把原来二进制启动的docker重新用yum的方法安装一遍,但还是遇到了以前遇到过的错误,一开始是各种

乱七八糟的rpm过低,无法升级,于是手动加载了一遍:

rpm -Uvh selinux-policy-3.13.1-102.el7.noarch.rpm libsemanage-2.5-4.el7.x86_64.rpm policycoreutils-2.5-8.el7.x86_64.rpm selinux-policy-targeted-3.13.1-102.el7.noarch.rpm libsemanage-python-2.5-4.el7.x86_64.rpm libselinux-utils-2.5-6.el7.x86_64.rpm policycoreutils-2.5-8.el7.x86_64.rpm policycoreutils-python-2.5-8.el7.x86_64.rpm libselinux-2.5-6.el7.x86_64.rpm libselinux-python-2.5-6.el7.x86_64.rpm setools-libs-3.3.8-1.1.el7.x86_64.rpm

完成后还是报错:

 大致意思是从https://get.daocloud.io/docker/yum-repo/main/centos/7/Packages/docker-engine-1.13.1-1.el7.centos.x86_64.rpm无法下载,因为客户的环境隔离的比较严格,可能跟代理设置有关系,导致了这种奇葩问题

于是乎尝试手动下载,结果可以,直接

wget https://get.daocloud.io/docker/yum-repo/main/centos/7/Packages/docker-engine-1.13.1-1.el7.centos.x86_64.rpm

wget https://get.daocloud.io/docker/yum-repo/main/centos/7/Packages/docker-engine-selinux-1.13.1-1.el7.centos.x86_64.rpm

rpm -ivh docker-engine-1.13.1-1.el7.centos.x86_64.rpm docker-engine-selinux-1.13.1-1.el7.centos.x86_64.rpm

安装成功,再次执行

curl -sSL https://get.daocloud.io/docker | sh

docker安装成功

软连接:ln -s /var/lib/docker /midware/docker

    ln -s  /home/hudson/workspace /midware/workspace

其中/home/hudson/workspace 没有io权限,需要

  chown hudson workspace/

  chgrp hudson workspace

 

工作日记2017-02-22