站長資訊網
最全最豐富的資訊網站

CentOS如何升級Bash(修復破殼漏洞)

下面由centos教程欄目給大家介紹CentOS 升級 Bash — 修復破殼漏洞 ,希望對需要的朋友有所幫助!

CentOS如何升級Bash(修復破殼漏洞)

因為很多公司都有自己的 yum 源,所以直接配置其他的 yum 源升級的話是不允許的,為了能方便的升級,并且安全的測試,先拿一臺測試機做測試。

CentOS 的修復方案

安裝 yum 插件 yum-downloadonly

注: yum-downloadonly 插件的作用是實現只下載所需包而不直接安裝

sudo yum -y install yum-downloadonly

添加 CentOS 的官方源 CentOS-Base.repo

CentOS 5 的官方源

# 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 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #released updates  [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

CentOS 6 的官方源

# 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 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.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 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.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 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.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 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

下載最新的 bash 包

把最新版本的 bash 的 rpm 包下載到 /tmp 目錄

sudo  yum -y install --downloadonly --downloaddir=/tmp/ bash

下載后的包名分別如下:

CentOS 5

bash-3.2-33.el5_10.4.x86_64.rpm

CentOS 6

bash-4.1.2-15.el6_5.2.x86_64.rpm

安裝最新的 bash 包

CentOS 5

sudo yum -y install bash-3.2-33.el5_10.4.x86_64.rpm

CentOS 6

sudo yum -y install bash-4.1.2-15.el6_5.2.x86_64.rpm

驗證

env X='() { (a)=>' sh -c "echo date"; cat echo 輸出如下:

date Mon Sep 29 10:11:56 CST 2014

env VAR='() { :;}; echo Bash is vulnerable!' bash -c "echo Bash Hello" 輸出如下:

Bash Hello

證明修復成功

加入現有的 rpm 源

最后一步就是把測試完成的包加入公司自己的源中,然后全網推送了。

贊(0)
分享到: 更多 (0)
網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號
久久精品无码一区二区WWW| 中文国产成人精品少久久| 亚洲精品无码人妻无码| 99国产精品免费观看视频| 国产亚洲精品福利在线无卡一 | 日韩有码在线视频| 在线精品日韩一区二区三区| 亚洲欧美日韩国产精品一区| 精品久久久中文字幕人妻| 久久久精品人妻一区二区三区四| 久久精品国产亚洲AV麻豆王友容| 亚洲精品美女久久久久99| 久久久久99精品成人片三人毛片| 亚洲精品国产成人影院| 日韩在线视频一区| 亚洲日韩看片无码电影| 亚洲AV日韩AV天堂久久| AV在线播放日韩亚洲欧| 日韩一区二区三区在线观看 | 久久九九久精品国产免费直播| 一色屋精品视频任你曰| 精品免费AV一区二区三区| 日韩a级毛片免费观看| 日韩在线看片中文字幕不卡 | 亚洲AV第一页国产精品| 亚洲处破女AV日韩精品| 久久精品噜噜噜成人av| 亚洲Av无码精品色午夜| 亚洲∧v久久久无码精品| 日韩精品无码一区二区三区免费| 久久av老司机精品网站导航| 久久国产三级精品| 少妇精品无码一区二区三区| 午夜精品久视频在线观看| 97精品在线观看| 亚洲国产精品白丝在线观看| 久久精品国产99国产精品导航 | 麻豆国产精品一二三在线观看| 国语自产精品视频在线看| 日产精品卡2卡三卡乱码网址| 国产成人综合久久精品免费|