Ted's Blog

Happy coding

RPM简明中文手册

Ted posted @ 2008年8月09日 01:20 in 未分类 with tags rpm , 1687 阅读


RPM是RedhatPackageManager,即redhat包管理器,rpm是一个功能强大的包管理器,可以创建,安装,查询,更改,升级和卸载软件包,一个包包含了文件的架构,包信息,名字,版本号和包的描述


更详细的信息,以自己系统上的rpm的manual为准 一、安装




命令格式:



rpm -i ( or --install) options file1.rpm ... fileN.rpm



参数:



file1.rpm ... fileN.rpm 将要安装的RPM包的文件名



详细选项:



-h (or --hash) 安装时输出hash记号 (``#'')


--test 只对安装进行测试,并不实际安装。


--percent 以百分比的形式输出安装的进度。


--excludedocs 不安装软件包中的文档文件


--includedocs 安装文档


--replacepkgs 强制重新安装已经安装的软件包


--replacefiles 替换属于其它软件包的文件


--force 忽略软件包及文件的冲突


--noscripts 不运行预安装和后安装脚本


--prefix 将软件包安装到由 指定的路径下


--ignorearch 不校验软件包的结构


--ignoreos 不检查软件包运行的操作系统


--nodeps 不检查依赖性关系


--ftpproxy 用 作为 FTP代理


--ftpport 指定FTP的端口号为



通用选项



-v 显示附加信息


-vv 显示调试信息


--root 让RPM将指定的路径做为"根目录",这样预安装程序和后安


装程序都会安装到这个目录下


--rcfile 设置rpmrc文件为


--dbpath 设置RPM 资料库存所在的路径为



二、删除



命令格式:



rpm -e ( or --erase) options pkg1 ... pkgN



参数



pkg1 ... pkgN :要删除的软件包



详细选项



--test 只执行删除的测试


--noscripts 不运行预安装和后安装脚本程序


--nodeps 不检查依赖性



通用选项



-vv 显示调试信息


--root 让RPM将指定的路径做为"根目录",这样预安装程序和后安装


程序都会安装到这个目录下


--rcfile 设置rpmrc文件为


--dbpath 设置RPM 资料库存所在的路径为



三、升级



命令格式



rpm -U ( or --upgrade) options file1.rpm ... fileN.rpm



参数



file1.rpm ... fileN.rpm 软件包的名字



详细选项



-h (or --hash) 安装时输出hash记号 (``#'')


--oldpackage 允许"升级"到一个老版本


--test 只进行升级测试


--excludedocs 不安装软件包中的文档文件


--includedocs 安装文档


--replacepkgs 强制重新安装已经安装的软件包


--replacefiles 替换属于其它软件包的文件


--force 忽略软件包及文件的冲突


--percent 以百分比的形式输出安装的进度。


--noscripts 不运行预安装和后安装脚本


--prefix 将软件包安装到由 指定的路径下


--ignorearch 不校验软件包的结构


--ignoreos 不检查软件包运行的操作系统


--nodeps 不检查依赖性关系


--ftpproxy 用 作为 FTP代理


--ftpport 指定FTP的端口号为



通用选项



-v 显示附加信息


-vv 显示调试信息


--root 让RPM将指定的路径做为"根目录",这样预安装程序和后安装程序都会安装到这个目录下


--rcfile 设置rpmrc文件为


--dbpath 设置RPM 资料库存所在的路径为



四、查询



命令格式:



rpm -q ( or --query) options



参数:



pkg1 ... pkgN :查询已安装的软件包



详细选项



-p (or ``-'') 查询软件包的文件


-f 查询属于哪个软件包


-a 查询所有安装的软件包


--whatprovides 查询提供了 功能的软件包


-g 查询属于 组的软件包


--whatrequires 查询所有需要 功能的软件包



信息选项



显示软件包的全部标识


-i 显示软件包的概要信息


-l 显示软件包中的文件列表


-c 显示配置文件列表


-d 显示文档文件列表


-s 显示软件包中文件列表并显示每个文件的状态


--scripts 显示安装、卸载、校验脚本


--queryformat (or --qf) 以用户指定的方式显示查询信息


--dump 显示每个文件的所有已校验信息


--provides 显示软件包提供的功能


--requires (or -R) 显示软件包所需的功能



通用选项



-v 显示附加信息


-vv 显示调试信息


--root 让RPM将指定的路径做为"根目录",这样预安装程序和后安装程序都会安装到这个目录下


--rcfile 设置rpmrc文件为


--dbpath 设置RPM 资料库存所在的路径为



五、校验已安装的软件包



命令格式:



rpm -V ( or --verify, or -y) options



参数



pkg1 ... pkgN 将要校验的软件包名



软件包选项



-p Verify against package file


-f 校验所属的软件包


-a Verify 校验所有的软件包


-g 校验所有属于组 的软件包



详细选项



--noscripts 不运行校验脚本


--nodeps 不校验依赖性


--nofiles 不校验文件属性



通用选项



-v 显示附加信息


-vv 显示调试信息


--root 让RPM将指定的路径做为"根目录",这样预安装程序和后安装程序都会安装到这个目录下


--rcfile 设置rpmrc文件为


--dbpath 设置RPM 资料库存所在的路径为



六、校验软件包中的文件



语法:



rpm -K ( or --checksig) options file1.rpm ... fileN.rpm



参数:



file1.rpm ... fileN.rpm 软件包的文件名



Checksig--详细选项



--nopgp 不校验PGP签名



通用选项



-v 显示附加信息


-vv 显示调试信息


--rcfile 设置rpmrc文件为




七、其它RPM选项



--rebuilddb 重建RPM资料库


--initdb 创建一个新的RPM资料库


--quiet 尽可能的减少输出


--help 显示帮助文件


--version 显示RPM的当前版本

Avatar_small
LEGEND SEO 说:
2020年12月29日 22:32

This is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: 123movies sites

Avatar_small
sk 说:
2021年3月09日 22:57

I wanted to thank you for this excellent read!! I definitely loved every little bit of it. เมล็ดกาแฟคั่ว

Avatar_small
budapest properties 说:
2021年4月04日 19:02

I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.

Avatar_small
seo experts in Vanco 说:
2021年4月07日 14:51

Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.

Avatar_small
free viagra 说:
2021年4月08日 21:54

It's really nice and meanful. it's really cool blog. Linking is very useful thing.you have really helped lots of people who visit blog and provide them usefull information.

Avatar_small
香芝市英会話 说:
2021年4月14日 19:12

Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.

Avatar_small
Google Camera 说:
2021年4月17日 16:13

Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.

Avatar_small
sk 说:
2021年5月13日 04:43

You have outdone yourself this time. It is probably the best, most short step by step guide that I have ever seen. <a href="https://www.gclub888.net/">Gclub888</a>

Avatar_small
folding bowie knives 说:
2021年6月02日 18:40

It is the intent to provide valuable information and best practices, including an understanding of the regulatory process.

Avatar_small
Catalytic Products 说:
2021年6月08日 22:48

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people.

Avatar_small
Buy Nembutal online 说:
2021年6月15日 23:27

Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.

Avatar_small
Faddy 说:
2021年7月14日 16:37

I read your blog frequently and I just thought I’d say keep up the amazing work! what you can give your dog for pain

Avatar_small
asdzxc 说:
2021年7月17日 03:32 Wrapze brings home reusable essentials. Our mission is to produce high quality and eco-friendly products to save the planet from waste rat traps outdoor on Amazon
Avatar_small
face mask 说:
2021年7月17日 20:04

Many thanks regarding submitting this kind of fantastic write-up! I came across your internet site perfect for my own wants. It includes great and also beneficial content. Maintain the nice perform! face mask

Avatar_small
Faddy 说:
2021年7月29日 21:58

A person's popular music is definitely astounding. You may have quite a few pretty good music artists. I actually need you actually the perfect with being successful. walmart one

Avatar_small
home-repair-hand-too 说:
2021年8月08日 15:44

i am for the first time here. I found this board and I in finding It truly helpful & it helped me out a lot. I hope to present something back and help others such as you helped me.

Avatar_small
cheap-mercedes-benz- 说:
2021年8月09日 12:26

With so many books and articles coming up to give gateway to make-money-online field and confusing reader even more on the actual way of earning money,

Avatar_small
Marriage Counselling 说:
2021年8月22日 15:33

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.

Avatar_small
karambit training kn 说:
2021年8月22日 18:47

Thanks a lot for one’s intriguing write-up. It’s actually exceptional. Searching ahead for this sort of revisions.

Avatar_small
no excuses runner 说:
2021年9月10日 23:05

Hindiyojana.in is a dedicated portal to share detailed information regarding various government schemes. We cover central govt's and state wise schemes. Be advised that this is not official website of any scheme and is not linked with any Indian govt's ministry. Indian Government Schemes

Avatar_small
ssali 说:
2022年9月26日 06:02

Great stuff. i am going to bookmark it, if you are looking for bluetooth fm transmitter, xiaomi redmi airdots, wifi versterker, beste wifi versterker, nokia 105, smartphone holder in Netherlands, get in touch with us.

 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter