Rpm软件包管理工具的妙用妙用

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

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. <http://bugzilla.redhat.com/bugzilla>

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. <http://bugzilla.redhat.com/bugzilla>

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 的用途。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航