一 在SUSE11sp3系统中将openssh从6升级到8
一 需求
在 SUSE11sp3 系统中,希望将openssh的版本从6升级到8,通过软件的更新从而漏洞修复,但系统中没有gcc编译器。
二 系统环境
查看原系统的系统版本与SSH版本。
linux-e9r4:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3
linux-e9r4:~ # ssh -V
OpenSSH_6.2p2, OpenSSL 0.9.8j-fips 07 Jan 2009
三 部署流程
1.上传编译安装的软件包
将安装所需的安装包放入/opt/中,由root用户执行
在 /opt 目录下包含如下包:
openssh-8.5p1.tar.gz openssl-1.1.1b.tar.gz zlib-1.2.1.1.tar.gz
2.安装 gcc编译软件
在SUSE系统使用 zypper 安装的方式(类似于centos系统的yum安装),解决gcc-c++的软件依赖问题。
zypper install gcc-c++
执行命令后,会安装相关依赖软件包,包括gcc gcc43 gcc43-c++ gcc-c++ glibc-devel libstdc++43-devel linux-kernel-headers
执行命令 gcc --version
可以查看gcc的版本
3.安装依赖zlib
先解压软件包,进行软件的配置
linux-e9r4:/opt # tar xf zlib-1.2.1.1.tar.gz
linux-e9r4:/opt # cd zlib-1.2.1.1/
linux-e9r4:/opt/zlib-1.2.1.1 # ./configure --shared
然后进行软件的编译
linux-e9r4:/opt/zlib-1.2.1.1 # make
最后进行软件的安装
linux-e9r4:/opt/zlib-1.2.1.1 # make install
4.安装依赖openssl
首先查看openssl软件版本
linux-e9r4:/opt # openssl version -a
接着解压软件包,进行软件的配置
linux-e9r4:/opt # tar xf openssl-1.1.1b.tar.gz
linux-e9r4:/opt # cd openssl-1.1.1b/
linux-e9r4:/opt/openssl-1.1.1b # ./config shared
然后进行软件的编译
linux-e9r4:/opt/openssl-1.1.1b # make
接着进行软件的安装
linux-e9r4:/opt/openssl-1.1.1b # make install
再备份旧的openssl二进制文件,并创建软链接
linux-e9r4:/opt/openssl-1.1.1b # mv /usr/bin/