yum help

step first: mount rdhat.iso to local disk

     for example : mount -o loop ../rhat.iso /media/redhat



step second: modi file

         file :   /etc/yum.repos.d/rhel-source.repo

         vi /etc/yum.repos.d/rhel-source.repo

--------------------------------------------------------------------------------

         baseurl= file:///media/redhat         ---- only change this

         file:///media/redhat   directory has mount redhat-iso disk 

-----------------------------------------------------------------------------------

step third: check file

view rhel-source.repo file (after modi) :

[rhel-source]

name=Red Hat Enterprise Linux $releasever - $basearch - Source

#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/

baseurl= file:///media/redhat 

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release



[rhel-source-beta]

name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source

baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

step fourth: give an example
yum --disablerepo =* --enablerepo= rhel-source install glibc.i686

step fifth: some command

1 //check update of rpm package

#yum check-update

2 //Update all rpm package

#yum update

???s

#yum upgrade

4 list package info in repos

# yum list

5 list installed package

# yum list installed

6 list can update package

# yum list updates

7 install package

# yum install pack_name

8  uninstall package

# yum remove pack_name


yum暂存(/var/cache/yum/)的相关参数

1 //清除暂存中rpm包文件

#yum clean packages

2 //清除暂存中rpm头文件

#yum clearn headers

3 //清除暂存中旧的rpm头文件

#yum clean oldheaders

4 //清除暂存中旧的rpm头文件和包文件

#yum clearn 或#yum clearn all

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值