centos7快速制作openssh 9.7 rpm包

下载开源脚本上传到centos7
https://github.com/boypt/openssh-rpms
code -> download zip

解压shell脚本
unzip openssh-rpms-main.zip

el5、el6、el7:对应CentOS5、6、7三个系统,编译相关的参数由SPECS目录下的openssh.spec控制。编译好的rpm包放在RPMS目录下。
pullsrc.sh:openssh相关源码下载脚本
version.env:定义了openssh及openssl源码的版本信息


下载源码包并上传到openssh-rpms-main/downloads
openssl 1.1.1w  x11-ssh-askpass-1.2.4.1.tar.gz   openssh-9.7p1.tar.gz

https://www.openssl.org/source/old/index.html
https://src.fedoraproject.org/repo/pkgs/openssh/
https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable

准备编译环境
yum groupinstall -y "Development Tools"
yum install -y imake rpm-build pam-devel krb5-devel zlib-devel libXt-devel libX11-devel gtk2-devel

修改version.env源码包修改为相应版本

./compile.sh el7

生成的RPM在openssh-rpms-main/el7/RPMS/x86_64

rpm -Uvh openssh-clients-9.7p1-1.el7.x86_64.rpm  openssh-server-9.7p1-1.el7.x86_64.rpm  openssh-9.7p1-1.el7.x86_64.rpm

chmod 600 /etc/ssh/ssh_host_rsa_key
chmod 600 /etc/ssh/ssh_host_ecdsa_key
chmod 600 /etc/ssh/ssh_host_ed25519_key

systemctl restart sshd

  • 9
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值