Red Hat Linux 9: Red Hat Linux Customization Guide | ||
---|---|---|
Indietro | Capitolo 32. Gestione dei pacchetti con RPM | Avanti |
RPM è un tool utile sia per la gestione del sistema sia per la diagnosi e la risoluzione dei problemi. Ecco alcuni esempi delle opzioni di RPM.
Potreste aver cancellato inavvertitamente alcuni file, ma non sapete esattamente quali. Per controllare l'intero sistema e capire quali file mancano, digitate il comando seguente:
rpm -Va |
Se alcuni file sono mancanti o sembrano danneggiati, dovete reinstallare il pacchetto oppure disinstallare e reinstallare il pacchetto.
Se non riconoscete un file, cercate a quale pacchetto appartiene digitando il comando seguente:
rpm -qf /usr/X11R6/bin/ghostview |
L'output è simile a:
gv-3.5.8-22 |
Potete integrare gli esempi sopra citati nella situazione seguente. Supponete di avere dei problemi con /usr/bin/paste. Verificate il pacchetto che contiene il programma, però non sapete quale pacchetto contiene paste. Eseguite il comando:
rpm -Vf /usr/bin/paste |
e il pacchetto corrispondente verrà verificato.
Volete ottenere maggiori informazioni su un programma in particolare? Usate il comando seguente per localizzare la documentazione fornita con il pacchetto che contiene tale programma:
rpm -qdf /usr/bin/free |
L'output che ottenete è il seguente:
/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 |
Se trovate un nuovo RPM, ma non sapete quali sono le sue funzioni, digitate il comando seguente:
rpm -qip crontabs-1.10-5.noarch.rpm |
L'output è simile a:
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. |
Se volete controllare quali file crontabs RPM installa. Potete inserire quanto segue:
rpm -qlp crontabs-1.10-5.noarch.rpm |
L'output che compare a video è simile a:
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. |
Questi sono solo alcuni esempi di ciò che RPM può fare. Usandolo ne scoprirete tanti altri.