linux配置yum-server,Linux-yum配置

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后成功

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值