1. 复制/etc/yum.repos.d/rhel-source.repo文件,改名位a.repo.
cat a.repo, 编辑如下:
[a]
name=a
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
2. 挂载镜像文件:
mount -o loop /opt/rhel-server-6.3-x86_64-dvd.iso /mnt/
3. 安装kvm
yum -y install kvm
这里要注意的几个问题是,在源的位置配置好后,出现问题重新配置的话,需要先清空:
1. yum clean all 清空以前装的东西,
2. 修改配置文件, 修改后yum update
3. 最后 yum -y insall XXXXXXXXX
附: 有人说rh5和rh6的yum配置不一样,这里我实验的结果是没啥区别。。。。
5的:
[root@str1 rhel5]# cat /etc/yum.repos.d/a.repo
[a]
name=a
baseurl=file:///var/www/html/rhel5/Server
enabled=1
gpgcheck=1
gpgkey=file:///var/www/html/rhel5/RPM-GPG-KEY-redhat-release