由于最近曝出linux的bash漏洞,想更新下bash,于是 想到了配置CentOS yum source。

测试bash漏洞的命令:

env x='() { :;}; echo "Your bash version is vulnerable"' bash -c "echo This is a test" 

Your bash version is vulnerable
This is a test

在此感谢网易的镜像文件!

.删除redhat原有的yum
rpm -aq|grep yum|xargs rpm -e --nodeps .访问网易提供的Linux yum源
http://mirrors.163.com/centos/6/os/x86_64/Packages/ 找到对应的yum 安装包
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm .进行安装yum
rpm -ivh python-iniparse-0.3.-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.-.el6.x86_64.rpm
rpm -ivh yum-3.2.-.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.-.el6.noarch.rpm .更新repo文件 mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.repo.bak vi /etc/yum.repos.d/rhel-debuginfo.repo [base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
gpgcheck=
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
gpgcheck=
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
gpgcheck=
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch
gpgcheck=
enabled= 、yum clean all 、yum update bash --测试一下

要注意一下路径的问题,其中要注意basearch、$releasever两个变量的值。

[root@localhost yum.repos.d]# env x='() { :;}; echo "Your bash version is vulnerable"' bash -c "echo This is a test"
This is a test
[root@localhost yum.repos.d]#

配置好了yum源,也更新了bash命令。

参考博客:

http://blog.chinaunix.net/uid-20940095-id-3275311.html

http://www.cnblogs.com/linuxer/archive/2011/11/10/2272521.html

Redhat 6 配置CentOS yum source的更多相关文章

  1. RedHat 5 配置CentOS yum 更新源

    YUM是Redhat Linux在线安装更新及软件的工具,但是这是RHEL5的收费功能,如果没有购买Redhat的服务时不能使用RHEL5的更新源的,会提示注册. 由于CentOS是从Redhat演化 ...

  2. 在VMware中为Redhat HAT配置本地yum源

    在VMware中为Redhat HAT配置本地yum源 今天准备使用CM安装大数据环境,到需要几台机器都使用同一套yum源才可以,所以想到将Redhat镜像文件拷贝到虚拟机中,在挂起使用,最后通过ht ...

  3. 【linux配置】在VMware中为Redhat HAT配置本地yum源

    在VMware中为Redhat HAT配置本地yum源 今天准备使用CM安装大数据环境,到需要几台机器都使用同一套yum源才可以,所以想到将Redhat镜像文件拷贝到虚拟机中,在挂起使用,最后通过ht ...

  4. RHEL6配置CentOS yum源

    RHEL6配置CentOS yum源

  5. Linux RedHat 7 配置本地 YUM源

    尽管RPM安装方法能够帮助用户查询软件相关的依赖关系,但是还是需要安装人员自己来解决,而且有些大型软件可能与数十个程序都有依赖关系,在这种情况下安装软件事件非常痛苦和耗费事件的事情,而Yum软件仓库可 ...

  6. rhel 7.0 配置centos yum源(2016/12/8),成功!

    1.首先查看redhat 7.0系统本身所安装的那些yum 软件包: rpm -qa | grep yum #列出所有已安装的yum包 2.删除这些包: rpm -e *.rpm --nodeps # ...

  7. Rhel5.5配置Centos yum源

    ruiy哥,抛砖引玉 当你使用rhel系统时,[大部分数据库中心及政府企业选择linux服务器时通常考虑采购的版本一般不外乎是Rhel红帽及Suse,理由你懂的EcoSystem!]你没有一个红帽网络 ...

  8. 配置CENTOS YUM更新源

    众所周知,Centos 有个很方便的软件安装工具  yum,但是默认安装完centos,系统里使用的是国外的centos更新源,这就造成了我们使用默认更新源安装或者更新软件时速度很慢的问题. 为了使用 ...

  9. redhat linux使用Centos yum源

    redhat Linux如果是没有购买红帽许可的话是不能使用redhat的yum源的,但是可以通过修改使之能使用Centos的yum源. 步骤一:删除redhat的yum [root@localhos ...

随机推荐

  1. dd,实现系统备份

    一.dd的使用 dd命令的解释dd:用指定大小的块拷贝一个文件,并在拷贝的同时进行指定的转换. 注意:指定数字的地方若以下列字符结尾则乘以相应的数字:b=512:c=1:k=1024:w=2 参数: ...

  2. php实用函数整理

    1. 排序:array_multisort 可以对多位数组的多个字段进行排序 例子1如下: //自定义数组排序--按转发数从高到低排序 function sortSelfRc($oneLayer){ ...

  3. Win7无线网络共享设置方法

    http://jingyan.baidu.com/article/4f34706e89bb2ae387b56d0b.html

  4. 基于MVVM的知乎日报应用安卓源码

    使用data binding , dagger2 , retrofit2和rxjava实现的,基于MVVM的知乎日报APP运行效果: <ignore_js_op> 使用说明: 项目结构 a ...

  5. 使用Mou 编写Markdown编辑器博客

    Mou Overview Mou, the missing Markdown editor for web developers. Syntax Strong and Emphasize strong ...

  6. [置顶] c++,vc6.0,中友元函数,无法访问私有字段(private)的问题(problem),cannot access private member declared in class 'Date'

    c++,vc6.0,中友元函数,无法访问私有字段(private)的问题(problem),cannot access private member declared in class 'Date' ...

  7. SignalR 跨域设置

    参考文章:http://www.cnblogs.com/nywd/p/3691813.html 上一节,已经实现了,当前域内的通信,这一节中,介绍一下跨域的即时通信,既然要做,我们肯定要把这个推送及聊 ...

  8. Android Drawable系列(1):自定义背景以及注意事项

    0. Shape自身属性 android:shape=["rectangle" | "oval" | "line" | "ring ...

  9. Android 调用webService(.net平台)

    什么是webservice? Web service是一个平台独立的,低耦合的,自包含的.基于可编程的web的应用程序,可使用开放的XML(标准通用标记语言下的一个子集)标准来描述.发布.发现.协调和 ...

  10. jquery实现asp.net 网页鼠标所在位置

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mouseposition. ...