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

來源:互聯網
上載者:User

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: PAMheaders not found

[root@dbaul01 openssh-7.4p1]#  

 

 

[root@dbaul01 openssh]# yum installpam-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 --addsshd

 

 

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

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

[root@localhost openssh-7.4p1]# cp -psshd_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

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.