redhat使用centos yum源

OS:rhel6.2 x86_64

前段时间爆出幽灵漏洞,需要升级glibc

[root@localhost 6.2]# ./testghost 
vulnerable
[root@localhost 6.2]# yum -y update glibc
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id,
              : refresh-packagekit, security, subscription-manager, tmprepo,
              : verify, versionlock
Updating certificate-based repositories.
Loading support for Red Hat kernel ABI
Setting up Update Process
No Packages marked for Update
[root@localhost 6.2]#

 源码升级glibc有很多依赖关系,rhel的yum源无法使用,使用centos的yum源进行升级

1、卸载rhel6.2默认的yum

[root@localhost 6.2]# rpm -qa|grep yum|xargs rpm -e --nodeps

2、安装centos6.2的yum软件

[root@localhost 6.2]# ll yum-*
-rw-r--r--. 1 root root 1010148 Dec  9  2011 yum-3.2.29-22.el6.centos.noarch.rpm
-rw-r--r--. 1 root root   27224 Sep 26  2011 yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
-rw-r--r--. 1 root root   27372 Dec  9  2011 yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm
[root@localhost 6.2]# rpm -ivh yum-*
warning: yum-3.2.29-22.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:yum-metadata-parser    ########################################### [ 33%]
   2:yum-plugin-fastestmirro########################################### [ 67%]
   3:yum                    ########################################### [100%]
[root@localhost 6.2]#

3、下载centos的yum源等配置文件

[root@localhost 6.2]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

[root@localhost 6.2]# wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[root@localhost 6.2]# cp CentOS6-Base-163.repo /etc/yum.repos.d/

[root@localhost 6.2]# cp RPM-GPG-KEY-CentOS-6  /etc/pki/rpm-gpg/

4、执行yum -y update glibc 升级

[root@localhost 6.2]# yum -y update glibc
Loaded plugins: fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
base                                                                                                                                                                                                                  | 3.7 kB     00:00     
base/primary_db                                                                                                                                                                                                       | 4.6 MB     00:12     
extras                                                   | 3.4 kB     00:00     
extras/primary_db                                        |  30 kB     00:00     
updates                                                  | 3.4 kB     00:00     
updates/primary_db                                       | 2.7 MB     00:08     
Setting up Update Process
Resolving Dependencies
--> Running transaction check

 等glibc升级完成,验证幽灵漏洞

[root@localhost 6.2]# ./testghost 
not vulnerable
[root@localhost 6.2]#

幽灵漏洞已经解决,rhel6.2使用centos yum源成功。

 

 

你可能感兴趣的:(redhat,centos,yum源)