源码编译升级openssl版本
官网下载openssl-1.1.1d.tar
gunzip openssl-1.1.1d.tar.gz
tar openssl-1.1.1d.tar
cd openssl-1.1.1d
./config --prefix=/usr/local/ssl shared
make
make install
替换老版本:
1) 备份
mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.old
mv /usr/lib/libssl.so /usr/lib/libssl.so.bak
mv /usr/lib/libcrypto.so /usr/lib/libcrypto.so.bak
2) 替换
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
ln -s /usr/local/ssl/lib/libssl.so /usr/lib/libssl.so
ln -s /usr/local/ssl/lib/libcrypto.so /usr/lib/libcrypto.so
ln -s /usr/local/ssl/lib/libssl.so.1.1 /lib/64/libssl.so.1.1
ln -s /usr/local/ssl/lib/libcrypto.so.1.1 /lib/64/libcrypto.so.1.1
ldd /usr/local/ssl/bin/openssl
ldd /usr/local/ssl/bin/openssl
libssl.so.1.1 => /lib/64/libssl.so.1.1
libcrypto.so.1.1 => /lib/64/libcrypto.so.1.1
libsocket.so.1 => /lib/64/libsocket.so.1
libnsl.so.1 => /lib/64/libnsl.so.1
libdl.so.1 => /lib/64/libdl.so.1
libpthread.so.1 => /lib/64/libpthread.so.1
libc.so.1 => /lib/64/libc.so.1
查看升级后的版本
openssl version
OpenSSL 1.1.1d 10 Sep 2019
源码编译升级openssh
官网下载openssh-8.1p1.tar
gunzip openssh-8.1p1.tar.gz
tar openssh-8.1p1.tar
cd openssh-8.1p1
./configure --with-ssl-dir=/usr/local/ssl /指定openssl目录
make
make install
ln -s /usr/local/bin/ssh /usr/bin/ssh
PATH=/usr/bin:/usr/sbin:/usr/local/bin
查看升级后的版本
ssh -V
OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019
阅读(6306) | 评论(0) | 转发(0) |