Openssh rpm 包制作

来源:互联网 发布:mysql 登录失败设置 编辑:程序博客网 时间:2024/06/06 00:03

0X01 下载openssh 源文件

rpm包制作的前期各种文件略过,我选择在http://mirror.aarnet.edu.au/pub/OpenBSD/OpenSSH/portable/ 下载合适的openssh 版本文件,我选择的是openssh-6.5p1.tar.gz 30-Jan-2014 06:29 1.2M 。

0x02制作步骤

tar zxvf openssh-6.5p1.tar.gzcp ./openssh-6.5p1/contrib/redhat/openssh.spec /usr/src/redhat/SPECS/cp openssh-5.8p1.tar.gz /usr/src/redhat/SOURCES/

如果不需要 x11-askpass 和 gnome-askpass ,可以编辑下面的值为1

# Do we want to disable building of x11-askpass? (1=yes 0=no)%define no_x11_askpass 1# Do we want to disable building of gnome-askpass? (1=yes 0=no)%define no_gnome_askpass 1

线上的设备需要askpass,所以不要动,因为存在依赖关系

执行下边的命令

cd /usr/src/redhat/SPECSrpmbuild -bb openssh.spec

其中可能会出现 :c compiler cannot create executables 的错误,执行一下命令清除即可。

export LIBS=

export CFLAGS=

等待。。。。。

制作完成之后

cd /usr/src/redhat/RPMS/x86_64/rpm -Uvh *.rpm

就可以了。

0x03 小结

因为要升级openssl 连带升级openssh,所以要先安装openssl 的rpm,后安装openssh。步骤虽然简单,解决的过程却不顺利,好事多磨吧

0 0
原创粉丝点击