安装docker

curl -sSL https://get.docker.com|sh

报错:unkonwn host
解决:修改dns解析

[root@localhost ~]# vi /etc/resolv.conf

search localdomain
nameserver 4.4.4.4
~

再次运行

curl -sSL https://get.docker.com|sh

报错:

curl: (35) error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

解决:升级curl至7.55.1

再次运行

curl -sSL https://get.docker.com|sh

报错:

curl: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

解决:

[root@localhost lib]#  vi /etc/ld.so.conf

include ld.so.conf.d/*.conf^M

/usr/local/lib
/usr/lib
~       

再次运行

curl -sSL https://get.docker.com|sh

报错:

curl:(35)error:14077410:SSLroutines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

解决:
升级OpenSSL库

wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1.tar.gz


报错:
cannot verify www.openssl.org's certificate, issued by `/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3':
Unable to locally verify the issuer's authority.
To connect to www.openssl.org insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.

解决:加上--no-check-certificate参数即可
wget --no-check-certificate https://www.openssl.org/source/openssl-1.1.0e.tar.gz



tar xvf openssl-1.0.1.tar.gz
cd openssl-1.0.1
./config --prefix=/usr/local/openssl
make && make install
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl /usr/include/openssl.bak
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
echo "/usr/local/openssl/lib" /etc/ld.so.conf
/sbin/ldconfig -v
openssl version -a

这里写图片描述
OpenSSL 升级为 1.0.1 版本

运行

curl -sSL https://get.docker.com|sh

还是报 handshake failure错误

于是到,https://curl.haxx.se/ca/cacert.pem下载最新的CA ,重新编译curl进Curl,cacert.pem是从https://curl.haxx.se/ca/cacert.pem下载下来的。/etc/pki/tls/certs/ca-bundle.crt是目标位置。

./configure --disable-shared --prefix=/usr/local/curl --with-ssl=/usr/local/openssl/  --with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt --with-ca-path=cacert.pem

之后还是不行,重新编译完curl后/usr/local下才有了curl,于是

 /usr/local/curl/bin/curl  -sSL https://get.docker.com|sh

才ok,墙裂怀疑是这一步的原因。

然后运行成功了,安装失败了

# Executing docker install script, commit: 716f7ca

Either your platform is not easily detectable or is not supported by this
installer script.
Please visit the following URL for more detailed installation instructions:
https://docs.docker.com/engine/installation/

我去https://docs.docker.com/engine/installation/ 看了一下
不同platform支持的各版本docker
这台测试机的版本是:RHEL 5.5 64bit

[root@localhost curl-7.55.1]# lsb_release -a
LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description:    Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Release:    5.5
Codename:   Carthage

但是!
Linux要求
去死吧!
那我这两天不都白做了?!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值