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에 대한 정보를 알아볼 수 있습니다:
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의 많은 기능 중 극히 소수에 불과합니다. 여러분은 RPM을 사용하면 할수록 훨씬 더 많은 기능이 있다는 것을 발견하실 것입니다.