6.5编译安装OpenSSH 7.3及RPM包制作教程.pdfVIP

  • 2
  • 0
  • 约3.23千字
  • 约 3页
  • 2026-01-20 发布于北京
  • 举报

6.5X86-64安装openssh7.3

前天另外一公司的哥们要加架一批服务器到的机房,安装完readhat6.8后进行正版

并升级补丁后,还是被安全评测机构扫出openssh版本太低及存在安全的。红帽

给他了一份openssh7.1p2.tar.gz源码包,但他不会安装。苦B的小哥整了二天无果,其间又

骚扰了无数次,最后让他发了一封邮件说明这个不影响系统的正常使用。然后

去呼悠的人。写到这里反正我是醉了

今天我们讨论一下openssh的源码包怎么编译成rpm包的方法,并我编译好的包。省

事的朋友可以下来直接安装。

安装编译所需工具

[root@localhost~]#yum-ygroupinstallDevelopmenttools

[root@localhost~]#yum-yinstallpam-develrpm-buildrpmdevtoolszlib-develkrb5-devel

tcp_wrapperstcp_wrappers-develtcp_wrappers-libslibX11-develxmkmflibXt-develwget

提醒:如果这些包安装失败,就是你的机器不能互联网的yum源。可以自己利用当盘

配本地yum源

配置RPM编译环境

我们指定编译的路径在家目录中的rpmbuild中,我是使用root进行操作的,所以路径为

/root/rpmbuild

[root@localhost~]#mkdir/root/rpmbuild

[root@localhost~]#cdrpmbuild

[root@localhost~]mkdir-pv{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}

升级OpenSSL到

[root@localhost~]#yumupdateopensslopenssl-devel

升级OpenSSL到

[root@localhost~]#yumupdateopensslopenssl-devel

openssh源码包

[root@localhost~]wget

[root@localhost~]#wget

s-1.2.4.1.tar.gz

建议到网上的源码包

编译OpenSSHRPM

配置SPEC文件

[root@localhost~]#cd/root/rpmbuild/SPECS

[root@localhost~]#tarzxvf../SOURCES/openssh-7.3p1.tar.gz

openssh-7.3p1/contrib/redhat/openssh.spec

[root@localhost~]#

mvopenssh-7.3p1/contrib/redhat/openssh.specopenssh-7.3p1.spec

[root@localhost~]#rm-rfopenssh-7.3p1

[root@localhost~]#

sed-i-es/%defineno_gnome_askpass0/%defineno_gnome_askpass1/g

openssh-7.3p1.spec

[root@localhost~]#

sed-i-es/%defineno_x11_askpass0/%defineno_x11_askpass1/g

openssh-7.3p1.spec

[root@localhost~]#sed-i-es/BuildPreReq/BuildRequires/gopenssh-7.3p1.s

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档