centos 6.7 升级opensh7.3

前端之家收集整理的这篇文章主要介绍了centos 6.7 升级opensh7.3前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、依赖库

zlib、openssl 版本低,自己编译安装

下载地址:

https://sourceforge.net/projects/libpng/files/zlib/1.2.8/ 的 zlib-1.2.8.tar.gz

http://www.linuxfromscratch.org/blfs/view/stable/postlfs/openssl.html 的https://openssl.org/source/openssl-1.0.2k.tar.gz

2、卸载系统里原有Openssh

[root@localhost softwares]# rpm -qa openssh ##查询系统原安装的openssh包全部卸载。

[root@localhost softwares]# rpm -e openssh --nodeps
[root@localhost softwares]# rpm -e openssh-server --nodeps
[root@localhost softwares]# rpm -e openssh-clients --nodeps


3、编译安装

tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make && make install


tar zxvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./config --prefix=/usr/ --shared
make
make test
make install

tar zxvf openssh-7.3p1.tar.gz
cd openssh-7.3p1
./configure --prefix=/usr/local >#Will install OpenSSH in /opt/{bin,etc,lib,sbin}
--sysconfdir=/etc/ssh >#will place the configuration files in /etc/ssh.
make
make install
4、 服务启动

如果启动不成功,看看服务脚本/etc/init.d/sshd 里面的sshd之类的路径是否正确。

原文链接:https://www.f2er.com/centos/378282.html

猜你在找的CentOS相关文章