日历

2017年十二月
« 9月    
 123
45678910
11121314151617
18192021222324
25262728293031

最近评论

    linux企业应用

    Redhat 6 利用Centos 6的源安装更新bash

    很久没有使用rhel了,今天使用rhel,发现自带的bash无法升级,只能使用centos的了。

    修改/etc/yum.repos.d/rhel-source.repo文件的内容,修改为如下:

     

    # 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-6-Base-mirrors.ustc.edu.cn
    baseurl=http://mirrors.ustc.edu.cn/centos/6/os/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
    gpgcheck=1
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6

    #released updates
    [updates]
    name=CentOS-6-Updates-mirrors.ustc.edu.cn
    baseurl=http://mirrors.ustc.edu.cn/centos/6/updates/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
    gpgcheck=1
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6

    #additional packages that may be useful
    [extras]
    name=CentOS-6-Extras-mirrors.ustc.edu.cn
    baseurl=http://mirrors.ustc.edu.cn/centos/6/extras/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
    gpgcheck=1
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6

    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-6-Plus-mirrors.ustc.edu.cn
    baseurl=http://mirrors.ustc.edu.cn/centos/6/centosplus/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6

    #contrib – packages by Centos Users
    [contrib]
    name=CentOS-6-Contrib-mirrors.ustc.edu.cn
    baseurl=http://mirrors.ustc.edu.cn/centos/6/contrib/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6

     

    然后执行:yum makecache

    再执行:yum -y update bash

    运行:env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”               只返回 this is a test,就说明bash没有漏洞了。

    评论已关闭。