下载地址:http://www.openssl.org/source/
# cd /usr/local/src/
# wget http://www.openssl.org/source/openssl-1.1.0e.tar.gz
# tar xf openssl-1.1.0e.tar.gz
# cd /openssl-1.1.0e
# ./config shared zlib --prefix=/usr/local/openssl && make && make install
# ./config -t
# make depend
# cd /usr/local
# ln -s openssl ssl
# echo "/usr/local/openssl/lib" >>/etc/ld.so.conf
# ldconfig
# vi /etc/profile
export OPENSSL=/usr/local/openssl/bin
export PATH=$OPENSSL:$PATH:$HOME/bin
# source /etc/profile
# mv /usr/bin/openssl /usr/bin/openssl.old
# mv /usr/include/openssl /usr/include/openssl.old
# ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
# ln -s /usr/local/openssl/include/openssl /usr/include/openssl
# ln -sf /usr/local/openssl/lib/libcrypto.so.1.0.0 /lib/libcrypto.so.6
# ldconfig -v
# ldd /usr/local/openssl/bin/openssl
会出现类似如下信息:
Linux-gate.so.1 => (0x0079f000)
libssl.so.1.1 => /usr/local/openssl/lib/libssl.so.1.1 (0x002a8000)
libcrypto.so.1.1 => /usr/local/openssl/lib/libcrypto.so.1.1 (0x00306000)
libz.so.1 => /lib/libz.so.1 (0x00775000)
libdl.so.2 => /lib/libdl.so.2 (0x00725000)
libpthread.so.0 => /lib/libpthread.so.0 (0x0072c000)
libc.so.6 => /lib/libc.so.6 (0x00593000)
/lib/ld-linux.so.2 (0x0056d000)
# which openssl
/usr/local/openssl/bin/openssl
14、依次如下执行:
[[email protected] openssl-1.1.0e]# ldd /usr/local/openssl/bin/openssl
会出现类似如下信息:
Linux-gate.so.1 => (0x0079f000)
libssl.so.1.1 => /usr/local/openssl/lib/libssl.so.1.1 (0x002a8000)
libcrypto.so.1.1 => /usr/local/openssl/lib/libcrypto.so.1.1 (0x00306000)
libz.so.1 => /lib/libz.so.1 (0x00775000)
libdl.so.2 => /lib/libdl.so.2 (0x00725000)
libpthread.so.0 => /lib/libpthread.so.0 (0x0072c000)
libc.so.6 => /lib/libc.so.6 (0x00593000)
/lib/ld-linux.so.2 (0x0056d000)
# which openssl
/usr/local/openssl/bin/openssl
# openssl version -a