当前位置:   article > 正文

CentOS 6.5配置国内在线yum源和制作openssh 9.8p1 rpm包 —— 筑梦之路_openssh 9.8 rpm

openssh 9.8 rpm

CentOS 6.5比较古老的版本了,而还是有一些古老的项目仍然在使用。

环境说明

1. 更换国内在线yum源

CentOS 6 在线可用yum源配置——筑梦之路_centos6可用yum源-CSDN博客

  1. cat > CentOS-163.repo << 'EOF'
  2. [base]
  3. name=CentOS-$releasever - Base - 163.com
  4. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  5. baseurl=http://mirrors.163.com/centos-vault/6.10/os/$basearch/
  6. gpgcheck=1
  7. gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
  8. #released updates
  9. [updates]
  10. name=CentOS-$releasever - Updates - 163.com
  11. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  12. baseurl=http://mirrors.163.com/centos-vault/6.10/updates/$basearch/
  13. gpgcheck=1
  14. gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
  15. #additional packages that may be useful
  16. [extras]
  17. name=CentOS-$releasever - Extras - 163.com
  18. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  19. baseurl=http://mirrors.163.com/centos-vault/6.10/extras/$basearch/
  20. gpgcheck=1
  21. gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
  22. #additional packages that extend functionality of existing packages
  23. [centosplus]
  24. name=CentOS-$releasever - Plus - 163.com
  25. baseurl=http://mirrors.163.com/centos-vault/6.10/centosplus/$basearch/
  26. gpgcheck=1
  27. enabled=0
  28. gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
  29. EOF

2. 更新缓存并安装软件测试

  1. yum clean all
  2. yum makecache fast
  3. yum install vim lrzsz wget curl net-tools openssh-server git
  4. yum update --exclude=centos* -exclude=kernel*

3.  基于开源项目制作openssh rpm包

直接制作openssh  9.8p1版本,2024年7月7日,当前最新版。

CentOS 5/6/7 基于开源项目制作openssh 9.6p1 rpm包—— 筑梦之路_centos6 openssh9.6rpm-CSDN博客

1)准备源码

  1. # 准备源码
  2. wget --no-check-certificate https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz
  3. wget --no-check-certificate https://www.openssl.org/source/openssl-1.1.1w.tar.gz
  4. git clone https://github.com/boypt/openssh-rpms.git
  5. # 将源码下载放到downloads目录下
  6. cp openss* openssh-rpms/downloads/

2)安装编译打包环境

  1. yum groupinstall -y "Development Tools"
  2. yum install -y imake rpm-build pam-devel krb5-devel zlib-devel libXt-devel libX11-devel gtk2-devel

3) 修改文件

  1. # 1. 修改文件version.env
  2. OPENSSLSRC=openssl-1.1.1w.tar.gz
  3. # 2. 修改文件pullsrc.sh compile.sh
  4. source ./version.env

4) 制作openssh rpm包

sh compile.sh el6

4. 安装测试验证

  1. cd el6/RPMS/x86_64/
  2. rm -f openssh-debuginfo-9.8p1-1.el6.x86_64.rpm
  3. rpm -Uvh *.rpm
  4. # 重启sshd服务
  5. service sshd restart
  6. service sshd status

 至此,在centos 6.5版本上成功制作openssh 9.8p1的rpm包。

二进制rpm包见我的资源。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/927595
推荐阅读
相关标签
  

闽ICP备14008679号