简单介绍一下系统环境:

操作系统:redhat6.3 ,安装的主要涉及到的包有:

root@192.168.100.252:/root# rpm -qa | grep ssh
openssh-.3p1-.el6.x86_64
openssh-server-.3p1-.el6.x86_64
openssh-clients-.3p1-.el6.x86_64
libssh2-1.2.-.el6.x86_64
root@192.168.100.252:/root# rpm -qa | grep openssl
openssl-1.0.-.el6.x86_64
openssl-devel-1.0.-.el6.x86_64

下面要做的就是把openssl升级到当前稳定版本 [源码升级,简单透明]

root@192.168.100.252:/data/installs/openssl-1.0.0m# ./config --prefix=/usr/local/openssl/ --openssldir=/usr/local/ssl shared zlib-dynamic
root@192.168.100.252:/data/installs/openssl-1.0.0m# make
root@192.168.100.252:/data/installs/openssl-1.0.0m# make test
root@192.168.100.252:/data/installs/openssl-1.0.0m# make install
...[回显省略]....
root@192.168.100.252:/data/installs/openssl-1.0.0m# cd /usr/local/openssl/
root@192.168.100.252:/usr/local/openssl# ls include/
openssl
root@192.168.100.252:/usr/local/openssl# ls lib/
engines libcrypto.a libcrypto.so libcrypto.so.1.0. libssl.a libssl.so libssl.so.1.0. pkgconfig

config参数解析一下:

--prefix=DIR : Install in DIR/bin, DIR/lib, DIR/include/openssl. Configuration files used by OpenSSL will be in DIR/ssl or the directory specified by --openssldir.

--openssldir=DIR : Directory for OpenSSL files. If no prefix is specified, the library files and binaries are also installed there.

shared : In addition to the usual static libraries, create shared libraries on platforms where it's supported. See "Note on shared libraries" below.

zlib-dynamic : Like "zlib", but has OpenSSL load the zlib library dynamically when needed. This is only supported on systems where loading of shared libraries is supported. This is the default choice.

-------------Note on shared libraries-----------

Shared libraries have certain caveats. Binary backward compatibility can't be guaranteed before OpenSSL version 1.0. The only reason to use them would be to conserve memory on systems where several programs are using OpenSSL. For some systems, the OpenSSL Configure script knows what is needed to build shared libraries for libcrypto and libssl. On these systems, the shared libraries are currently not created by default, but giving the option "shared" will get them created. This method supports Makefile targets for shared library creation, like linux-shared. Those targets can currently be used on their own just as well, but this is expected to change in future versions of OpenSSL.

生词比较多,翻译一下:共享库一些说明:1.0之前的版本不保证向后的兼容性,而且还坚持使用1.0之前的版本的唯一目的是为了保存多个正在使用openssl的程序的内存,某些系统在使用openssl编译的时候,脚本会识别需要添加的libcrypto和libssh库,对于这些系统,共享库没有默认立即创建,而是提供shared选项,以这种方式提供共享库的创建。例如linux-shared,这些编译出来的文件可以在当前系统上正常运行,但是这些对于以后的版本,openssl可能会做一些修改。

从INSTALL文件上可以看到,openssl升级对于某些正在使用openssl动态链接库的程序保持了兼容性,但是如果要坚持编译新的动态链接库,将导致基于老版本的openssl的其他程序出现未知的错误(下面的sshd的问题就讲到了这个问题)

下面来查查sshd服务启动失败的原因

上面的图中可以看到/usr/bin/ssh调用了三个有crypt字段动态链接库:

libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f89404a7000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f893fc3e000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f893f2d8000)

其中/usr/lib64/libcrypto.so.10 是调用了最新编译的动态链接库,这个库也是前面编译出来的库之一,很明显是由于这个库的替换导致sshd服务启动失败。

下面讲下外网服务器openssl升级的情况:

升级脚本:

./config --prefix=/usr/ --openssldir=/usr/local/openssl
make
make test
make install

这样升级会产生一堆的新文件替换原来的旧文件:

/usr/lib64
drwxr-xr-x root root Jan : engines
-rw-r--r-- root root Jan : libcrypto.a
-rw-r--r-- root root Jan : libssl.a
drwxr-xr-x root root Jan : pkgconfig /usr/include/openssl/*.h /usr/bin
-rwxr-xr-x 1 root root 4265 Jan 23 11:57 c_rehash
-rwxr-xr-x 1 root root 569237 Jan 23 11:57 openssl

这些文件都是直接替换,如果不做备份,根本没法还原。。。外网服务器上的窟噜够大啦

建议小伙伴们没事就别去做这个升级了,除非你深刻的知道你的系统调用openssl动态链接库的程序很少,否则,极其有可能导致你系统在重启后一堆的未知error。

openssl升级并发症的更多相关文章

  1. CentOS6.5的openssl升级

    CentOS6.5的openssl升级:(修复心脏漏血漏洞) [root@linux1 ~]# rpm -qi openssl|grep VersionVersion : 1.0.1e Vendor: ...

  2. tomcat 8.0安装ssl证书,及centos7.2 的openssl升级到最新版本,及ERR_SSL_OBSOLETE_CIPHER错误解决

    openssl官网https://www.openssl.org/source/下载最新的文件 2017-Feb-16 12:03:39 openssl-1.1.0e.tar.gz 安装的时候,可能由 ...

  3. Openssl 升级操作

    转自:http://www.cnblogs.com/lzcys8868/p/9235538.html 首先我觉得没事就用绿盟扫漏洞的公司,就是闲的蛋疼,傻逼!不少服务器使用nginx,如果openss ...

  4. openssl 升级操作 -2

    首先我觉得没事就用绿盟扫漏洞的公司,就是闲的蛋疼,傻逼!不少服务器使用nginx,如果openssl 是静态编译的,直接将openssl 编译到nginx里面去了,这就意味着,单纯升级openssl ...

  5. linux环境中,openssl升级及openresty中nginx基于新版本openssl重新编译

    需求说明: 最近在对系统进行安全扫描的时候,出现了openssl版本的问题,建议对openssl版本进行升级,在此记录下升级过程. 环境说明: 操作系统:RHEL 6.6 升级操作过程: 1.下载最新 ...

  6. nginx openssl升级支持http2

    阿里云openssl升级,实现nginx主动推送 nginx主动推送能够有效减少不必要的报文传输,减少用户请求次数,以达到更快访问速度 现有版本检查 [root@node3 ~]# openssl v ...

  7. 阿里云openssl升级,实现nginx主动推送,nginx主动推送能够有效减少不必要的报文传输,减少用户请求次数,以达到更快访问速度

    现有版本检查 [root@node3 ~]# openssl version               #这个版本是无法支持http2.0主动推送功能.需要升级为2019版本. OpenSSL 1. ...

  8. Linux openssl 升级、降级

    Linux openssl 升级.降级 最近遇到一些朋友使用微信退款,报openssl版本为问题,需要对openssl进行降级. 现在环境的openssl版本如下: root@c215a2b695ef ...

  9. 【转】linux /centos 中OpenSSL升级方法详解

    相关软件下载地址 Apache:http://httpd.apache.org/ Nginx:http://nginx.org/en/download.html OpenSSL:http://www. ...

随机推荐

  1. Spring MVC 中 AJAX请求并返回JSON

    一.以ModelAndView的方式返回 先看下JavaScript代码: /** * 保存-同步(版本控制库) */ function saveSynchronizedVcHorse(obj) { ...

  2. Spring中bean的生命周期!

    Spring 中bean 的生命周期短暂吗? 在spring中,从BeanFactory或ApplicationContext取得的实例为Singleton,也就是预设为每一个Bean的别名只能维持一 ...

  3. zookeeper 入门讲解实例 转

    转  http://www.blogjava.net/BucketLi/archive/2010/12/21/341268.html zookeeper使用和原理探究(一) zookeeper介绍zo ...

  4. 基于终端的日志工具logview

    概述 logview是一个Shell脚本编写的基于终端的日志工具, 具有终端通知, email通知, 错误信息颜色配置, 以及灵活强大的监控配置. 还可以灵活的配置脚本监控的时间, 以及错误发生时需要 ...

  5. 【微软100题】定义字符串的左旋转操作:把字符串前面的若干个字符移动到字符串的尾部。 如把字符串abcdef左旋转2位得到字符串cdefab。请实现字符串左旋转的函数。

    package test; /** * 定义字符串的左旋转操作:把字符串前面的若干个字符移动到字符串的尾部. 如把字符串abcdef左旋转2位得到字符串cdefab. 请实现字符串左旋转的函数. * ...

  6. JS字符编码函数区别分析

    http://www.jb51.net/article/14657.htm js对文字编码有3个函数: escape,encodeURI,encodeURIComponent, 对应的解码函数:une ...

  7. C#指南,重温基础,展望远方!(8)C#数组

    数组是一种数据结构,其中包含许多通过计算索引访问的变量. 数组中的变量(亦称为数组的元素)均为同一种类型,我们将这种类型称为数组的元素类型. 数组类型是引用类型,声明数组变量只是为引用数组实例预留空间 ...

  8. Redis(十六):集群搭建(手动和自动)

    一.概述 Redis3.0版本之后支持Cluster. 1.1.redis cluster的现状 目前redis支持的cluster特性: 1):节点自动发现 2):slave->master ...

  9. [k8s]metricbeat的kubernetes模块&kube-metric模块

    正确姿势启动metricbeat metricbeat.modules: - module: system metricsets: - cpu - filesystem - memory - netw ...

  10. JAVA多线程之synchronized和volatile实例讲解

    在多线程中,提到线程安全.线程同步,我们经常会想到两个关键字:volatile和synchronized,那么这两者有什么区别呢? 1. volatile修饰的变量具有可见性 volatile是变量修 ...