当前位置:   article > 正文

CentOS 8 制作openssh9.0/9.2/9.3 rpm包——筑梦之路_centos8 openssl rpm包

centos8 openssl rpm包
  1. 由于openssh在CentOS 8系列系统中yum源最新版本是8.0,而opensh漏洞比较多
  2. openssh-server-8.0p1-10.el8.x86_64
  3. openssh-clients-8.0p1-10.el8.x86_64
  4. openssh-8.0p1-10.el8.x86_64
  5. cat /etc/os-release
  6. NAME="CentOS Linux"
  7. VERSION="8"
  8. ID="centos"
  9. ID_LIKE="rhel fedora"
  10. VERSION_ID="8"
  11. PLATFORM_ID="platform:el8"
  12. PRETTY_NAME="CentOS Linux 8"
  13. ANSI_COLOR="0;31"
  14. CPE_NAME="cpe:/o:centos:centos:8"
  15. HOME_URL="https://centos.org/"
  16. BUG_REPORT_URL="https://bugs.centos.org/"
  17. CENTOS_MANTISBT_PROJECT="CentOS-8"
  18. CENTOS_MANTISBT_PROJECT_VERSION="8"
  19. [root@localhost ~]# cat /etc/redhat-release
  20. CentOS Linux release 8.5.2111
  21. 这是当前的环境信息
  1. 1.安装制作的工具
  2. dnf install rpm-build zlib-devel openssl-devel gcc perl-devel pam-devel libXt-devel gtk2-devel make perl -y
  3. wget http://www.rpmfind.net/linux/centos/8-stream/PowerTools/x86_64/os/Packages/imake-1.0.7-11.el8.x86_64.rpm
  4. rpm -ivh imake-1.0.7-11.el8.x86_64.rpm
  5. 2.下载源码
  6. wget https://src.fedoraproject.org/repo/pkgs/openssh/x11-ssh-askpass-1.2.4.1.tar.gz/8f2e41f3f7eaa8543a2440454637f3c3/x11-ssh-askpass-1.2.4.1.tar.gz
  7. wget https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/openssh-9.0p1.tar.gz
  8. 3.初始化
  9. rpmbuild -ba openssh.spec
  10. 4.拷贝源码包到相应目录
  11. cp openssh-9.0p1.tar.gz x11-ssh-askpass-1.2.4.1.tar.gz /root/rpmbuild/SOURCES
  12. 5.解压源码包,拷贝spec文件
  13. tar -zxf openssh-9.0p1.tar.gz
  14. cp openssh-9.0p1/contrib/redhat/openssh.spec /root/rpmbuild/SPECS/
  15. 6.切换目录,修改openssh.spec文件
  16. cd rpmbuilld/SPEC
  17. 注释#BuildRequires: openssl-devel < 1.1
  18. 7.制作rpm包
  19. rpmbuild -ba openssh.spec
  20. 制作完成后生成的包:
  21. tree rpmbuild/RPMS/x86_64/
  22. rpmbuild/RPMS/x86_64/
  23. ├── openssh-9.0p1-1.el8.x86_64.rpm
  24. ├── openssh-askpass-9.0p1-1.el8.x86_64.rpm
  25. ├── openssh-askpass-debuginfo-9.0p1-1.el8.x86_64.rpm
  26. ├── openssh-askpass-gnome-9.0p1-1.el8.x86_64.rpm
  27. ├── openssh-askpass-gnome-debuginfo-9.0p1-1.el8.x86_64.rpm
  28. ├── openssh-clients-9.0p1-1.el8.x86_64.rpm
  29. ├── openssh-clients-debuginfo-9.0p1-1.el8.x86_64.rpm
  30. ├── openssh-debuginfo-9.0p1-1.el8.x86_64.rpm
  31. ├── openssh-debugsource-9.0p1-1.el8.x86_64.rpm
  32. ├── openssh-server-9.0p1-1.el8.x86_64.rpm
  33. └── openssh-server-debuginfo-9.0p1-1.el8.x86_64.rpm
  1. 利用制作的rpm包对openssh进行升级
  2. 升级只需要三个rpm包:
  3. openssh-9.0p1-1.el8.x86_64.rpm
  4. openssh-clients-9.0p1-1.el8.x86_64.rpm
  5. openssh-server-9.0p1-1.el8.x86_64.rpm
  6. #升级安装
  7. 注意:升级后的ssh会受到selinux影响,建议配置disabled
  8. setenforce 0
  9. dnf install ./*.rpm
  10. #设置权限
  11. chmod 600 /etc/ssh/ssh_host*key
  12. echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
  13. echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
  14. #重启sshd服务
  15. systemctl restart sshd && systemctl enable sshd
  16. #验证版本
  17. [root@localhost ~]# ssh -V
  18. OpenSSH_9.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021

打包好的rpm包下载:

openssh-9.0p1-el8.tgz-Linux文档类资源-CSDN下载

可以拿来制作的src包:

openssh-9.0p1-1.el8.src.rpm-Linux文档类资源-CSDN下载

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

闽ICP备14008679号