如何更新伺服器上的 SSL 組件太舊而無法通過 SSL 實際下載包
在這裡似乎是第 22 個問題。將伺服器更新到較新版本是不可能的。我只需要將 Apache 更新到特定的(舊版本)。
伺服器是 CentOS 6.3。基本儲存庫已過時,我必須對其進行更新以使用保險庫儲存庫。
yum
但是,它需要 HTTPS,並且每當我在更新儲存庫後嘗試執行時,我都會得到:https://vault.centos.org/centos/6/os/i386/repodata/repomd.xml:
$$ Errno 14 $$建立ssl連接的問題
顯然,我需要更新 yum、openssl 等……但是,當我無法從 through 開始下載軟體包時,我該怎麼做
yum
?有沒有辦法避免手動建構這些包?這是 CentOS-Base.repo:(注意:將這些更改為 http 似乎不起作用)
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base baseurl=https://vault.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates baseurl=https://vault.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=https://vault.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=https://vault.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib baseurl=https://vault.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
我設法
yum
通過手動安裝所有更新的軟體包來執行。首先,我從 CentOS 6.10 vault 下載了軟體包——是的,我故意在我的 6.3 伺服器上使用了 6.10:(注意,repo 是劣質的,我不得不多次重試這些命令)
wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/yum-3.2.29-81.el6.centos.noarch.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/yum-utils-1.1.30-41.el6.noarch.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/openssl-1.0.1e-57.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/openssl-devel-1.0.1e-57.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/openssl-perl-1.0.1e-57.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/openssl-static-1.0.1e-57.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/curl-7.19.7-53.el6_9.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/libcurl-7.19.7-53.el6_9.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/libcurl-devel-7.19.7-53.el6_9.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/nss-3.36.0-8.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/nss-util-3.36.0-1.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/nss-tools-3.36.0-8.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/nss-sysinit-3.36.0-8.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/nss-softokn-3.14.3-23.3.el6_8.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/nss-softokn-freebl-3.14.3-23.3.el6_8.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/nspr-4.19.0-1.el6.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/p11-kit-0.18.5-2.el6_5.2.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/p11-kit-trust-0.18.5-2.el6_5.2.i686.rpm wget --no-check-certificate https://vault.centos.org/centos/6.10/os/i386/Packages/ca-certificates-2018.2.22-65.1.el6.noarch.rpm
然後我安裝了軟體包:
rpm -Uvh openssl*.rpm rpm -Uvh ns*.rpm rpm -Uvh *curl*.rpm rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm rpm -Uvh yum*.rpm rpm -Uvh p11*.rpm rpm -Uvh ca-certificates-2018.2.22-65.1.el6.noarch.rpm
如果對已安裝的軟體包有任何警告,請添加
--force
到rpm
命令中。最後,我跑了
yum clean all
,然後yum install httpd
一切又正常了。已安裝最新的 Apache 更新檔級別。上面的某些軟體包可能不需要。這取決於系統上已經安裝的內容。例如,如果
openssl-perl.i686
未安裝,請不要安裝它,否則將需要安裝 Perl 依賴項。
我遇到了同樣的問題,經過多次試驗和錯誤後,Webserver 的 Docker 是解決方案。我建議不要嘗試僅更新 Apache。有太多的依賴最終會讓你絕望。
(我知道這應該放在評論部分,但我很少有聲譽來評論一個問題。)