RedHat 5.7升级为PAE内核,并更新yum源
内核升级为PAE的方式
1.安装好RedHat 5.7的系统后,将rhel-server-5.7-i386-dvd.iso解压,进入下列目录下,下面两个包传到redhat 5.7里。
2.执行安装命令:
yum install -y kernel-PAE-* --nogpgcheck
3.安装好后进入/boot/grub/grub.conf目录
[root@redhat-57 ~]# vi /boot/grub/grub.conf
将default=1改为default=0并保存
4.然后reboot重启,内核即成功改为2.6.18-274.el5PAE。
更新yum源
1.将redhat的yum源替换成centos的源
[root@redhat-57 ~]# cd /etc/yum.repos.d/
[root@redhat-57 yum.repos.d]# ll
total 24
-rw-r--r-- 1 root root 67 Apr 28 17:53 redhat.repo
-rw-r--r-- 1 root root 561 Jun 29 2011 rhel-debuginfo.repo
-rw-r--r-- 1 root root 1749 Apr 28 17:52 rhel-source.repo
2.如果没有rhel-source.repo文件,则需要新建,在rhel-source.repo中填入一下内容:
[root@redhat-57 yum.repos.d]# vi 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-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/5.10/os/i386/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5#released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/5.10/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/5.10/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/5.10/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/5.10/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5
清理缓存
[root@redhat-57 yum.repos.d]# yum clean all
更新缓存
[root@redhat-57 yum.repos.d]# yum makecache