rpm & yum

http://www.idevelopment.info/data/Unix/Linux/LINUX_RPMCommands.shtml

$ man rpm

安装 rpm 包:

$ rpm -i package.rpm


查看未安装的 rpm 包信息:

      -p, --package PACKAGE_FILE
              Query an (uninstalled) package PACKAGE_FILE.  The PACKAGE_FILE may be specified as an ftp or http style URL, in which case the package header will be downloaded and queried.  See  FTP/HTTP
              OPTIONS  for  information  on  rpm's  internal  ftp  and http client support. The PACKAGE_FILE argument(s), if not a binary package, will be interpreted as an ASCII package manifest unless
              --nomanifest option is used.  In manifests, comments are permitted, starting with a '#', and each line of a package manifest file  may  include  white  space  separated  glob  expressions,
              including URL's, that will be expanded to paths that are substituted in place of the package manifest as additional PACKAGE_FILE arguments to the query.


$ rpm -qpi --requires package.rpm


chenqiang@qiang:~/Downloads$ rpm -qpi --requires flash-plugin-11.2.202.291-release.i386.rpm
Name        : flash-plugin                 Relocations: (not relocatable)
Version     : 11.2.202.291                      Vendor: Adobe Systems Inc.
Release     : release                       Build Date: 2013年05月24日 星期五 09时31分49秒
Install Date: (not installed)               Build Host: frbld_lnx_016.macromedia.com
Group       : Applications/Internet         Source RPM: flash-plugin-11.2.202.291-release.src.rpm
Size        : 18392545                         License: Commercial
Signature   : (none)
Packager    : Adobe Systems Inc.
URL         : http://www.adobe.com/downloads/
Summary     : Adobe Flash Player 11.2
Description :
Adobe Flash Plugin 11.2.202.291
Fully Supported: Mozilla SeaMonkey 1.0+, Firefox 1.5+, Mozilla 1.7.13+
glibc >= 2.4
/bin/sh  
/bin/sh  
/bin/sh  
/bin/sh  
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1

rpm -qf /usr/bin/locale

可以查询某个文件隶属于哪个 rpm 包

yum 常用命令行命令

安装软件(以foo-x.x.x.rpm为例):yum install foo-x.x.x.rpm



删除软件:yum remove foo-x.x.x.rpm或者yum erase foo-x.x.x.rpm
升级软件:yum upgrade foo或者yum update foo
查询信息:yum info foo
搜索软件(以包含foo字段为例):yum search foo
显示软件包依赖关系:yum deplist foo
其它参数参见man yum

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值