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之类的路径是否正确。


你可能感兴趣的:(linux)