1.上传redhat 6.3 镜像包到服务器
2.创建目录rh6disk
3.将镜像mount到该目录 mount -o loop rhel6.3-x86-64.iso /root/rh6disk/
4.配置yum
cd /etc/yum.repos.d/
vi rhel6.repo
[rhel-server]
name=rhel6-server
baseurl=file:///root/rh6disk/Server
enable=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-HighAvailability]
name=rhel6-HighAvailability
baseurl=file:///root/rh6disk/HighAvailability
enable=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-ScalableFileSystem]
name=rhel6-ScalableFileSystem
baseurl= file:///root/rh6disk/ScalableFileSystem
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-ResilientStorage]
name=rhel6-ResilientStorage
baseurl= file:///root/rh6disk/ResilientStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
问题:用yum安装libaio-devel-0.3.105失败,执行yum install libaio-devel-0.3.105报错如下 [root@ITMSplus-HDM1 yum.repos.d]# yum install libaio-devel-0.3.105
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
rhel-HighAvailability | 4.0 kB 00:00 ...
rhel-ResilientStorage | 4.0 kB 00:00 ...
rhel-ScalableFileSystem | 4.0 kB 00:00 ...
rhel-server | 4.0 kB 00:00 ...
Setting up Install Process
No package libaio-devel-0.3.105 available.
Error: Nothing to do
分析与处理:百度搜索 "Unable to read consumer identity",找到其解决方案
vi /etc/yum/pluginconf.d/product-id.conf
vi /etc/yum/pluginconf.d/subscription-manager.conf
Set enabled to 0 as follows in both files:
[main]
enabled=0
清除yum 缓存 rm -rfv /var/cache/yum/*
yum clean all
重新执行 但执行yum install libaio-devel-0.3.105后,虽然不报"Unable to read consumer identity",但依然No package libaio-devel-0.3.105 available. Error: Nothing to do 然后再安装镜像中搜索 libaio-devel-0.3.105,发现搜索不到,突然想到可以版本号不对,就执行安装yum install libaio-devel后成功