制作yum源(Redhat6.4)

    1、mkdir -p /mnt/cdrom

    2、mount -o loop /usr/local/rhel-server-6.4-i386-dvd.iso  /mnt/cdrom/(或者将镜像光盘挂载上去,通过df  -m 找到挂载的光盘如/dev/sr1,然后执行mount -o loop /dev/sr1  /mnt/cdrom)

    3、cd /etc/yum.repos.d

    4、mkdir -p bak

    5、mv *.repo bak/

6、vi /etc/yum.repos.d/redhat.repo

(将

[RHEL]

name=RHEL6.4

baseurl=file:///mnt/cdrom

gpgcheck=0

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

enabled=1

复制进去,保存退出)

    7、yum clean all

    8、yum update