# openssl version
2.下載安裝更新版本
# wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz# tar zxvf openssl-1.1.1g.tar.gz
# cd openssl-1.1.1g.tar.gz
# ./config --prefix=/opt/openssl --openssldir=/usr/local/ssl shared zlib
# make && make install
3.備份原始版本
# mv /usr/bin/openssl /usr/bin/openssl-1.0.1k
# mv /usr/include/openssl /usr/include/openssl-1.0.1k
4.更新版本
# ln -s /opt/openssl/bin/openssl /usr/bin/openssl
# ln -s /opt/openssl/include/openssl /usr/include/openssl
# echo "/opt/openssl/lib" > /etc/ld.so.conf.d/openssl-1.1.1g.conf
# ln -s /opt/openssl/lib/libssl.so.1.1 /usr/lib/libssl.so.1.1
# ln -s /opt/openssl/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1
5.驗證
# openssl version
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
# ldd /usr/bin/openssl
linux-vdso.so.1 => (0x00007ffcfe9f8000)
libssl.so.1.1 => not found
libcrypto.so.1.1 => not found
libz.so.1 => /lib64/libz.so.1 (0x00007f9a51e13000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f9a51c0f000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9a519f3000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9a51625000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9a52029000)
# ln -s /opt/openssl/lib/libssl.so.1.1 /lib64/libssl.so.1.1
# ln -s /opt/openssl/lib/libcrypto.so.1.1 /lib64/libcrypto.so.1.1
# openssl version
OpenSSL 1.1.1g 21 Apr 2020
0 意見:
張貼留言