歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> 學習Linux

CentOS 6.5系統升級openssh7.4,centosopenssh7.4

CentOS 6.5系統升級openssh7.4,centosopenssh7.4


熱度2 評論 10 www.BkJia.Com  網友分享於:  2017-02-15 04:02:20     浏覽數42270次

CentOS 6.5系統升級openssh7.4,centosopenssh7.4


 

 

Linux  升級openssh7.4

 

 

環境:CentOS 6.5

 

 

http://zlib.net/zlib-1.2.8.tar.gz

 

准備安裝包

 

 

 

 

 

解壓:zlib-1.2.8.tar.gz

[root@dbaul01 openssh]# tar -xvf zlib-1.2.8.tar.gz

[root@dbaul01 openssh]# cd zlib-1.2.8

[root@dbaul01 zlib-1.2.8]# ./configure 

 

 

[root@dbaul01 zlib-1.2.8]# make

 

[root@dbaul01 zlib-1.2.8]# make install

 

 

 

[root@dbaul01 zlib-1.2.8]# ll /usr/local/lib

 

 

 

查看目前的openssl版本

[root@dbaul01 openssh]# openssl version

 

 

解壓openssl 1.1

 

[root@dbaul01 openssh]# tar -xvf openssl-1.1.0c.tar.gz

[root@dbaul01 openssh]# cd openssl-1.1.0c

[root@dbaul01 openssl-1.1.0c]#

[root@dbaul01 openssl-1.1.0c]# ./config

[root@dbaul01 openssl-1.1.0c]#make

[root@dbaul01 openssl-1.1.0c]# make install

 

[root@dbaul01 openssl-1.1.0c]# mv /usr/bin/openssl /usr/bin/openssl2016122121

 

[root@dbaul01 openssl-1.1.0c]# ./config shared zlib

[root@dbaul01 openssl-1.1.0c]# make

 

 

[root@dbaul01 openssl-1.1.0c]# mv /usr/bin/openssl /usr/bin/openssl.bak

[root@dbaul01 openssl-1.1.0c]# ln /usr/local/bin/openssl /usr/bin/openssl

 

[root@dbaul01 openssl-1.1.0c]# openssl versiona -a

openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

[root@dbaul01 openssl-1.1.0c]#

 

[root@dbaul01 openssl-1.1.0c]# ln -s /usr/local/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1

[root@dbaul01 openssl-1.1.0c]# ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1 

 

[root@dbaul01 openssl-1.1.0c]# openssl version

OpenSSL 1.1.0c  10 Nov 2016

[root@dbaul01 openssl-1.1.0c]#

 

 

 

 

[root@bogon openssh]# tar -xvf openssl-fips-2.0.12.tar.gz

[root@bogon openssl-fips-2.0.12]# ./config

[root@bogon openssl-fips-2.0.12]# make

[root@bogon openssl-fips-2.0.12]# make install

 

 

[root@bogon openssl-1.0.2i]# ./config

[root@bogon openssl-1.0.2i]# make

[root@bogon openssl-1.0.2i]# make install

[root@bogon openssl-1.0.2i]# cd /usr/local/ssl/

[root@bogon ssl]# cd bin/

[root@bogon bin]# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl

 

[root@bogon bin]# openssl version -a

OpenSSL 1.0.2i  22 Sep 2016

 

 

 

 

 

官方步驟:

http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssh.html

 

 

[root@dbaul01 openssh-7.4p1]#  ./configure --prefix=/usr                     \

            --sysconfdir=/etc/ssh             \

            --with-md5-passwords              \

            --with-privsep-path=/var/lib/sshd

 

 

[root@dbaul01 openssh-7.4p1]#./configure \
  --prefix=/usr \
  --sysconfdir=/etc/ssh \
  --with-md5-passwords \
  --with-pam \
  --with-tcp-wrappers \
  --with-ssl-dir=/usr/local/ssl \
  --without-hardening
  

 

configure: error: PAM headers not found

[root@dbaul01 openssh-7.4p1]#  

 

 

[root@dbaul01 openssh]# yum install pam-devel.x86_64 -y

 

再次編譯

 

[root@dbaul01 openssh-7.4p1]# ./configure   --prefix=/usr   --sysconfdir=/etc/ssh   --with-md5-passwords   --with-pam   --with-tcp-wrappers   --with-ssl-dir=/usr/local/ssl   --without-hardening

 

 

 

 

[root@dbaul01 openssh-7.4p1]# make

 

[root@dbaul01 openssh-7.4p1]# make install

 

 

[root@localhost redhat]# pwd

/root/openssh/openssh-7.4p1/contrib/redhat

[root@localhost redhat]# cp sshd.init /etc/init.d/ss

sshd  sssd 

[root@localhost redhat]# cp sshd.init /etc/init.d/sshd

cp: overwrite `/etc/init.d/sshd'? ch^H^H^C

[root@localhost redhat]# cp sshd.init /e^C/init.d/sshd

[root@localhost redhat]# mv /etc/init.d/sshd /etc/init.d/sshd20161222

[root@localhost redhat]# cp sshd.init /etc/init.d/sshd

[root@localhost redhat]# chmod u+x /etc/init.d/sshd

[root@localhost redhat]# chkconfig --add sshd

 

 

[root@localhost openssh-7.4p1]# cp ssh_config /etc/ssh/ssh_config

cp: overwrite `/etc/ssh/ssh_config'? y

[root@localhost openssh-7.4p1]# cp -p sshd_config /etc/ssh/sshd_config

cp: overwrite `/etc/ssh/sshd_config'? y

[root@localhost openssh-7.4p1]#

 

 

 

[root@localhost openssh-7.4p1]# ssh -V

OpenSSH_7.4p1, OpenSSL 1.0.2i  22 Sep 2016

[root@localhost openssh-7.4p1]#

 

root@UL03 openssh-7.4p1]# ./configure   --prefix=/usr   --sysconfdir=/etc/ssh   --with-md5-passwords   --with-pam   --with-tcp-wrappers   --with-ssl-dir=/usr/local/ssl   --without-hardening

configure: error: PAM headers not found

 

http://www.bkjia.com/Linuxjc/1192910.html TechArticle

Copyright © Linux教程網 All Rights Reserved