Zlib?最新版地址?
https://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz
Openssl 地址 ?wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
Openssh地址
https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.8p1.tar.gz
安装顺序 :先安装openssl?, openssh?, zlib? #严格按照安装顺序进行
1 Openssl? 安装
yum -y install openssl-devel pcre-devel pam-devel gcc-c++ zlib-devel perl
tar -zxvf openssl-1.1.1g.tar.gz
cd openssl-1.1.1g
ls
./config --prefix=/usr/local/openssl
make && make install
ldd /usr/local/openssl/bin/openssl???? #检查函数库
echo "/usr/local/openssl/lib" >>?/etc/ld.so.conf? ??#添加所缺函数库
ldconfig -v??????? #更新函数库
openssl/bin/openssl version? ??? #查看新安装的版本
?
which openssl?????????? #查看旧版本openssl命令在哪里
mv /bin/openssl /usr/bin/openssl.old????? #将旧版本openssl移除,如果路径不一致请将你的环境的openssl移除
ln -sf /usr/local/openssl/bin/openssl /usr/bin/openssl???? ??? #新版本制作软链接
openssl version???????? 最后查看版本,更新完毕
2? Openssh ?安装
tar -zxvf openssh-8.8p1.tar.gz
cd openssh-8.8p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-zlib --without-openssl-header-check --with-ssl-dir=/usr/local/openssl/ --with-privsep-path=/var/lib/sshd
Make
rpm -e --nodeps `rpm -qa | grep openssh`
make install
cp -p contrib/redhat/sshd.init /etc/init.d/sshd
chmod +x /etc/init.d/sshd
vim /etc/ssh/sshd_config
PermitRootLogin yes #允许root登录
setenforce 0
Sshd -t
Chomd 600 /etc/ssh/ssh_host_ecdsa_key 等
ssh -V
3 Zlib ?安装
yum install -y gcc make
mv zlib-1.2.11.tar.gz /opt/
cd /opt/
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --libdir=/lib64/
make
make install
ll /lib64/libz* #查看到是1.2.11 版本的就代表安装成功
rpm -e zlib-1.2.7-19.el7_9.x86_64 --nodeps
ldconfig -v
升级完成。
|