CentOS 7 OpenSSL安装

前端之家收集整理的这篇文章主要介绍了CentOS 7 OpenSSL安装前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
CentOS 7 OpenSSL安装

OpenSSL Version:openssl-1.0.2f.tar.gz
OpenSSL地址为http://www.openssl.org/source/openssl-1.0.2f.tar.gz


1、安装 Openssl:
# wget http://www.openssl.org/source/openssl-1.0.2f.tar.gz
# tar -xzf openssl-1.0.2f.tar.gz
# cd openssl-1.0.2f
# mkdir /usr/local/openssl
# ./config --prefix=/usr/local/openssl
# make
# make install

2、查看路径

# which openssl
/usr/local/openssl/bin/openssl

为了使用方便,以及以后版本更新方便,可以创建软连接,如下:

# ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl


3、执行以下命令
# cd /usr/local/openssl

# ldd /usr/local/openssl/bin/openssl
    linux-vdso.so.1 =>  (0x00007ffc63975000)
    libssl.so.1.1 => not found
    libcrypto.so.1.1 => not found
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f8d9da0f000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8d9d7f3000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f8d9d431000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8d9dc28000)

安装OK

4、查看版本

# openssl version
/usr/local/openssl/bin/openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

找不到动态库libssl.so.1.1,在root用户下执行:
ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
原文链接:https://www.f2er.com/centos/374530.html

猜你在找的CentOS相关文章