Engineer's tipLinux

rpm 질의

-q(–query) 옵션을 사용하여 rpm 패키지의 필요한 정보를 확인

-qa : 시스템에 설치되어 있는 모든 패키지 리스트를 보여준다.

 

[root@sales-linux CentOS]# rpm -qa

[root@sales-linux CentOS]# rpm -q –all

~

vsftpd-2.0.5-24.el5_8.1

libhbaapi-devel-2.2-6.el5

dump-0.4b41-6.el5

nss-3.13.1-5.el5_8

libacl-2.2.39-8.el5

libhbaapi-2.2-6.el5

libgfortran44-4.4.6-3.el5.1

xulrunner-devel-10.0.5-1.el5_8

expat-devel-1.95.8-11.el5_8

libxml2-python-2.6.26-2.1.15.el5_8.2

mkinitrd-5.1.19.6-75.el5

PyXML-0.8.4-6.el5

sabayon-2.12.4-9.el5

system-config-bind-4.0.3-5.el5.centos

libtool-ltdl-1.5.22-7.el5_4

tclx-8.4.0-5.fc6

 

grep을 사용해서 특정 패키지가 설치되어 있는지 확인 할 수 있다.

[root@sales-linux CentOS]# rpm -qa | grep mysql

[root@sales-linux CentOS]# rpm -qa | grep vsftpd

vsftpd-2.0.5-24.el5_8.1

[root@sales-linux CentOS]#

 

 

-qi : 설치되어 있는 패키지의 자세한 정보를 보여준다.

 

[root@localhost ~]# rpm -qi httpd

package httpd is not installed

[root@localhost mail]# rpm -qa | grep mysql

mysql-5.0.95-1.el5_7.1

[root@localhost mail]# rpm -qi mysql

[root@localhost mail]# rpm -q –info mysql

Name        : mysql                        Relocations: (not relocatable)

Version     : 5.0.95                            Vendor: CentOS

Release     : 1.el5_7.1                     Build Date: Tue Feb 14 07:08:03 2012

Install Date: Wed Jul 18 14:14:01 2012         Build Host: builder10.centos.org

Group       : Applications/Databases        Source RPM: mysql-5.0.95-1.el5_7.1.src.rpm

Size        : 8582075                          License: GPLv2 with exceptions

Signature   : DSA/SHA1, Tue Feb 14 12:09:23 2012, Key ID a8a447dce8562897

URL         : http://www.mysql.com

Summary     : MySQL client programs and shared libraries

Description :

MySQL is a multi-user, multi-threaded SQL database server. MySQL is a

client/server implementation consisting of a server daemon (mysqld)

and many different client programs and libraries. The base package

contains the MySQL client programs, the client shared libraries, and

generic MySQL files.

[root@localhost mail]#

-qf : 특정 파일이 속해 있는 rpm 패키지명을 출력해 준다.(특정파일이 어떤 패키지에 속해있는지 확인하기 위해서 사용)

 

[root@localhost mail]# which df

/bin/df

[root@localhost mail]# rpm -qf /bin/df

[root@localhost mail]# rpm -q –file /bin/df

coreutils-5.97-34.el5_8.1

[root@localhost mail]#

-ql : 패키지가 포함하고 있는 파일 리스트를 모두 출력해 준다.

 

[root@localhost mail]# rpm -ql coreutils

[root@localhost mail]# rpm -q –list coreutils

/bin/basename

/bin/cat

/bin/chgrp

/bin/chmod

/bin/chown

/bin/cp

/bin/cut

~
/usr/share/man/man1/unlink.1.gz

/usr/share/man/man1/users.1.gz

/usr/share/man/man1/vdir.1.gz

/usr/share/man/man1/wc.1.gz

/usr/share/man/man1/who.1.gz

/usr/share/man/man1/whoami.1.gz

/usr/share/man/man1/yes.1.gz

[root@localhost mail]#

-qd : 패키지가 포함하고 있는 문서 파일을 모두 출력해 준다.

 

[root@localhost bin]# rpm -qd coreutils

[root@localhost bin]# rpm -q –docfiles coreutils

/usr/share/doc/coreutils-5.97/ABOUT-NLS

/usr/share/doc/coreutils-5.97/ChangeLog.bz2

/usr/share/doc/coreutils-5.97/NEWS

/usr/share/doc/coreutils-5.97/README

/usr/share/doc/coreutils-5.97/THANKS

/usr/share/doc/coreutils-5.97/TODO

/usr/share/doc/coreutils-5.97/fileutils/ChangeLog-1997.bz2

/usr/share/doc/coreutils-5.97/fileutils/ChangeLog.bz2

~

/usr/share/man/man1/uniq.1.gz

/usr/share/man/man1/unlink.1.gz

/usr/share/man/man1/users.1.gz

/usr/share/man/man1/vdir.1.gz

/usr/share/man/man1/wc.1.gz

/usr/share/man/man1/who.1.gz

/usr/share/man/man1/whoami.1.gz

/usr/share/man/man1/yes.1.gz

-qc : 패키지가 포함하고 있는 설정파일 리스트를 모두 출력해 준다

 

[root@localhost bin]# rpm -qc coreutils

[root@localhost bin]# rpm -q –configfiles coreutils

/etc/DIR_COLORS

/etc/DIR_COLORS.xterm

/etc/pam.d/runuser

/etc/pam.d/runuser-l

/etc/pam.d/su

/etc/pam.d/su-l

/etc/profile.d/colorls.csh

/etc/profile.d/colorls.sh

 

 

-qR : 해당패키지와 의존성이 걸려있는 패키지 리스트를 보여준다.

 

[root@localhost bin]# rpm -qR coreutils

[root@localhost bin]# rpm -q –requires coreutils

/bin/sh

/bin/sh

/bin/sh

/bin/sh

/sbin/install-info

config(coreutils) = 5.97-34.el5_8.1

findutils

grep

libacl.so.1()(64bit)

libacl.so.1(ACL_1.0)(64bit)

libattr

libattr.so.1()(64bit)

libattr.so.1(ATTR_1.1)(64bit)

libc.so.6()(64bit)

libc.so.6(GLIBC_2.2.5)(64bit)

libc.so.6(GLIBC_2.3)(64bit)

libc.so.6(GLIBC_2.3.4)(64bit)

libc.so.6(GLIBC_2.4)(64bit)

libcrypt.so.1()(64bit)

libdl.so.2()(64bit)

libm.so.6()(64bit)

libm.so.6(GLIBC_2.2.5)(64bit)

libpam.so.0()(64bit)

libpam.so.0(LIBPAM_1.0)(64bit)

libpam_misc.so.0()(64bit)

libpam_misc.so.0(LIBPAM_MISC_1.0)(64bit)

librt.so.1()(64bit)

librt.so.1(GLIBC_2.2.5)(64bit)

libselinux >= 1.25.6-1

libselinux.so.1()(64bit)

pam >= 0.66-12

rpmlib(CompressedFileNames) <= 3.0.4-1

rpmlib(PayloadFilesHavePrefix) <= 4.0-1

rpmlib(VersionedDependencies) <= 3.0.3-1

rtld(GNU_HASH)

[root@localhost bin]#

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다