| Red Hat Linux 7.0: The Official Red Hat Linux Reference Guide | ||
|---|---|---|
| Indietro | Capitolo 5. Amministrazione dei Pacchetti con RPM | Avanti |
RPM è uno strumento molto utile sia per amministrare il vostro sistema che per diagnosticare e risolvere i problemi. Il modo migliore per capire tutte le opzioni è di fare riferimento a qualche esempio.
Supponiamo che siano stati cancellati accidentalmente alcuni file, ma non siete sicuri di ciò che avete cancellato. Se volete controllare tutto il sistema e vedere cosa potrebbe mancare, potreste digitare:
rpm -Va
|
Se manca qualche file, o sembra essere danneggiato, potreste reinstallare il pacchetto.
Ammettiamo che vi imbattiate in un file che non conoscete. Per sapere a quale pacchetto appartiene, digitate:
rpm -qf /usr/X11R6/bin/ghostview
|
L'output dovrebbe apparire come:
gv-3.5.8-10
|
Possiamo combinare i due esempi precedenti nello stesso contesto. Diciamo che avete qualche problema con /usr/bin/paste. Vorreste verificare il pacchetto che ha installato questo programma, ma non sapete di che pacchetto si tratta. Digitate semplicemente:
rpm -Vf /usr/bin/paste
|
Vorreste saperne di più su un particolare programma? Digitate il seguente comando per individuare la documentazione che accompagna il pacchetto a cui appartiene il programma (nella fattispecie ispell):
rpm -qdf /usr/bin/md5sum
|
L'output generato è:
/usr/share/doc/textutils-2.0a/NEWS
/usr/share/doc/textutils-2.0a/README
/usr/info/textutils.info.gz
/usr/man/man1/cat.1.gz
/usr/man/man1/cksum.1.gz
/usr/man/man1/comm.1.gz
/usr/man/man1/csplit.1.gz
/usr/man/man1/cut.1.gz
/usr/man/man1/expand.1.gz
/usr/man/man1/fmt.1.gz
/usr/man/man1/fold.1.gz
/usr/man/man1/head.1.gz
/usr/man/man1/join.1.gz
/usr/man/man1/md5sum.1.gz
/usr/man/man1/nl.1.gz
/usr/man/man1/od.1.gz
/usr/man/man1/paste.1.gz
/usr/man/man1/pr.1.gz
/usr/man/man1/ptx.1.gz
/usr/man/man1/sort.1.gz
/usr/man/man1/split.1.gz
/usr/man/man1/sum.1.gz
/usr/man/man1/tac.1.gz
/usr/man/man1/tail.1.gz
/usr/man/man1/tr.1.gz
/usr/man/man1/tsort.1.gz
/usr/man/man1/unexpand.1.gz
/usr/man/man1/uniq.1.gz
/usr/man/man1/wc.1.gz
|
Ammettiamo che troviate un nuovo pacchetto RPM, ma non sapete di che si tratta. Per visualizzare una descrizione del pacchetto, digitate:
rpm -qip sndconfig-0.48-1.i386.rpm
|
L'output dovrebbe essere
Name : sndconfig Relocations: (not relocateable)
Version : 0.48 Vendor: Red Hat
Release : 1 Build Date: Mon 10 Jul 2000 02:25:40
Install date: (none) Build Host: porky.devel.redhat.com
Group : Applications/Multimedia Source RPM: sndconfig-0.48-1.src.rpm
Size : 461734 License: GPL
Packager : Red Hat <http://bugzilla.redhat.com/bugzilla>
Summary : The Red Hat Linux sound configuration tool.
Description :
Sndconfig is a text based tool which sets up the configuration files
you'll need to use a sound card with a Red Hat Linux system.
Sndconfig can be used to set the proper sound type for programs which
use the /dev/dsp, /dev/audio and /dev/mixer devices. The sound
settings are saved by the aumix and sysV runlevel scripts.
|
Ora volete vedere quali file installa. Digitate :
rpm -qlp sndconfig-0.48-1.i386.rpm
|
L'output è
/usr/sbin/pnpprobe
/usr/sbin/sndconfig
/usr/share/locale/cs/LC_MESSAGES/sndconfig.mo
/usr/share/locale/da/LC_MESSAGES/sndconfig.mo
/usr/share/locale/de/LC_MESSAGES/sndconfig.mo
/usr/share/locale/es/LC_MESSAGES/sndconfig.mo
/usr/share/locale/fr/LC_MESSAGES/sndconfig.mo
/usr/share/locale/hu/LC_MESSAGES/sndconfig.mo
/usr/share/locale/id/LC_MESSAGES/sndconfig.mo
/usr/share/locale/is/LC_MESSAGES/sndconfig.mo
/usr/share/locale/it/LC_MESSAGES/sndconfig.mo
/usr/share/locale/ko/LC_MESSAGES/sndconfig.mo
/usr/share/locale/no/LC_MESSAGES/sndconfig.mo
/usr/share/locale/pt/LC_MESSAGES/sndconfig.mo
/usr/share/locale/pt_BR/LC_MESSAGES/sndconfig.mo
/usr/share/locale/ro/LC_MESSAGES/sndconfig.mo
/usr/share/locale/ru/LC_MESSAGES/sndconfig.mo
/usr/share/locale/sk/LC_MESSAGES/sndconfig.mo
/usr/share/locale/sl/LC_MESSAGES/sndconfig.mo
/usr/share/locale/sr/LC_MESSAGES/sndconfig.mo
/usr/share/locale/sv/LC_MESSAGES/sndconfig.mo
/usr/share/locale/tr/LC_MESSAGES/sndconfig.mo
/usr/share/locale/uk/LC_MESSAGES/sndconfig.mo
/usr/share/man/man8/pnpprobe.8.gz
/usr/share/man/man8/sndconfig.8.gz
/usr/share/sndconfig/sample.au
/usr/share/sndconfig/sample.midi
|
Questi sono solo alcuni esempi. Usando il sistema, troverete molte altre opzioni disponibili per il programma RPM.