15.4. RPM で金を抑制する

RPM は、システムの管理と問題の診断と修正の両方に役立ちます。すべてのオプションを把握する最適な方法は、いくつかの例を参照してください。
  • 場合によっては、誤って一部のファイルを削除しましたが、削除内容を把握しているわけではありません。システム全体を検証し、足りないものを確認するには、以下のコマンドを実行します。
    rpm -Va
    一部のファイルが欠落しているか、破損している場合、パッケージを再インストールするか、またはアンインストールしてからパッケージを再インストールします。
  • 場合によっては、認識しないファイルが表示される場合があります。パッケージを所有するパッケージを確認するには、次のコマンドを実行します。
    rpm -qf /usr/bin/ggv
    出力は以下のようになります。
    ggv-2.6.0-2
    
  • 以下のシナリオにおいて、上記の 2 つの例を組み合わせることができます。/usr/bin/paste に問題があるとします。そのプログラムを所有するパッケージを確認しますが、どのパッケージが 貼り付ける かは分からません。以下のコマンドを入力します。
    rpm -Vf /usr/bin/paste
    また、適切なパッケージが検証されています。
  • 特定のプログラムに関する詳細情報を見つけてもよろしいですか?以下のコマンドを試し、そのプログラムを所有するパッケージに含まれるドキュメントを確認できます。
    rpm -qdf /usr/bin/free
    出力は以下のようになります。
    /usr/share/doc/procps-3.2.3/BUGS
    /usr/share/doc/procps-3.2.3/FAQ
    /usr/share/doc/procps-3.2.3/NEWS
    /usr/share/doc/procps-3.2.3/TODO
    /usr/share/man/man1/free.1.gz
    /usr/share/man/man1/pgrep.1.gz
    /usr/share/man/man1/pkill.1.gz
    /usr/share/man/man1/pmap.1.gz
    /usr/share/man/man1/ps.1.gz
    /usr/share/man/man1/skill.1.gz
    /usr/share/man/man1/slabtop.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-7.noarch.rpm
    出力は以下のようになります。
    Name        : crontabs                     Relocations: (not relocatable)
    Version     : 1.10                              Vendor: Red Hat, Inc
    Release     : 7                             Build Date: Mon 20 Sep 2004 05:58:10 PM EDT
    Install Date: (not installed)               Build Host: tweety.build.redhat.com
    Group       : System Environment/Base       Source RPM: crontabs-1.10-7.src.rpm
    Size        : 1004                             License: Public Domain
    Signature   : DSA/SHA1, Wed 05 Jan 2005 06:05:25 PM EST, Key ID 219180cddb42a60e
    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
    出力は以下の例のようになります。
    /etc/cron.daily
    /etc/cron.hourly
    /etc/cron.monthly
    /etc/cron.weekly
    /etc/crontab
    /usr/bin/run-parts
    
これらはいくつかの例です。RPM に使用することが多くあります。