免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 782 | 回复: 0
打印 上一主题 下一主题

RPM 管理系统 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-09-19 14:05 |只看该作者 |倒序浏览

                   RPM 管理系统
RPM 对于管理系统、诊断和修正问题都极有用途。要理解它的选项的最佳途径是通过示范。


  • 可能你不小心删除了一些文件,却不能肯定删除了哪些文件。如果你想校验整个系统来看一看缺少哪些文件,你可以试一试下面的命令:
    rpm -Va
    如果缺少某些文件或它们似乎被损坏,你可能应该重新安装该软件包或删除安装然后再重新安装该软件包。

  • 有时候,你可能会看到不认识的文件。要发现哪个软件包拥有它,你可以输入:
    rpm -qf /usr/X11R6/bin/ghostview
    它的输出和以下相似:
    gv-3.5.8-22

  • 我们可以在以下的假想情况下组合以上的两个例子。假设你的 /usr/bin/paste 出了问题,你想校验拥有该程序的软件包,但是你不知道哪个软件包拥有 paste。你只需输入以下命令就可以了:
    rpm -Vf /usr/bin/paste
    这样,适当的软件包就会被校验。

  • 你想知道关于某一特定的程序的详细信息吗?你可以试用下面的命令来查找拥有该程序的软件包所附带的文档:
    rpm -qdf /usr/bin/free
    它的输出和以下相似:
    /usr/share/doc/procps-2.0.11/BUGS
    /usr/share/doc/procps-2.0.11/NEWS
    /usr/share/doc/procps-2.0.11/TODO
    /usr/share/man/man1/free.1.gz
    /usr/share/man/man1/oldps.1.gz
    /usr/share/man/man1/pgrep.1.gz
    /usr/share/man/man1/pkill.1.gz
    /usr/share/man/man1/ps.1.gz
    /usr/share/man/man1/skill.1.gz
    /usr/share/man/man1/snice.1.gz
    /usr/share/man/man1/tload.1.gz
    /usr/share/man/man1/top.1.gz
    /usr/share/man/man1/uptime.1.gz
    /usr/share/man/man1/w.1.gz
    /usr/share/man/man1/watch.1.gz
    /usr/share/man/man5/sysctl.conf.5.gz
    /usr/share/man/man8/sysctl.8.gz
    /usr/share/man/man8/vmstat.8.gz

  • 你可能会发现一个新的 RPM,但是你不知道它的用途。要寻找关于它的信息,使用下面的命令:
    rpm -qip crontabs-1.10-5.noarch.rpm
    它的输出看起来和以下相似:
    Name        : crontabs                     Relocations: (not relocateable)
    Version     : 1.10                              Vendor: Red Hat, Inc.
    Release     : 5                             Build Date: Fri 07 Feb 2003 04:07:32 PM EST
    Install date: (not installed)               Build Host: porky.devel.redhat.com
    Group       : System Environment/Base       Source RPM: crontabs-1.10-5.src.rpm
    Size        : 1004                             License: Public Domain
    Signature   : DSA/SHA1, Tue 11 Feb 2003 01:46:46 PM EST, Key ID fd372689897da07a
    Packager    : Red Hat, Inc.
    Summary     : Root crontab files used to schedule the execution of programs.
    Description :
    The crontabs package contains root crontab files. Crontab is the
    program used to install, uninstall, or list the tables used to drive the
    cron daemon. The cron daemon checks the crontab files to see when
    particular commands are scheduled to be executed. If commands are
    scheduled, then it executes them.

  • 也许你想指定 crontabs RPM 会安装哪些文件。你可以输入下面的命令:
    rpm -qlp crontabs-1.10-5.noarch.rpm
    它的输出看起来和下面相似:
    Name        : crontabs                     Relocations: (not relocateable)
    Version     : 1.10                              Vendor: Red Hat, Inc.
    Release     : 5                             Build Date: Fri 07 Feb 2003 04:07:32 PM EST
    Install date: (not installed)               Build Host: porky.devel.redhat.com
    Group       : System Environment/Base       Source RPM: crontabs-1.10-5.src.rpm
    Size        : 1004                             License: Public Domain
    Signature   : DSA/SHA1, Tue 11 Feb 2003 01:46:46 PM EST, Key ID fd372689897da07a
    Packager    : Red Hat, Inc.
    Summary     : Root crontab files used to schedule the execution of programs.
    Description :
    The crontabs package contains root crontab files. Crontab is the
    program used to install, uninstall, or list the tables used to drive the
    cron daemon. The cron daemon checks the crontab files to see when
    particular commands are scheduled to be executed. If commands are
    scheduled, then it executes them.

以上不过是几个例子。随着你的使用经验的增加,你会发现更多 RPM 的用途。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/43891/showart_385300.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP