[Linux] RPM 패키지 상세 정보 확인하기

rpm 명령어를 사용하여 RPM 패키지 설치 및 이름, 버전, 빌드 시간 등의 상세 정보를 확인할 수 있는데요. 저는 rpm 명령어를 통해 Ansible로 Deploy 시 Deploy 환경의 RPM 패키지 버전 등의 상세 정보를 확인하여 버전에 따라 로직을 구분할 때 사용하였습니다.

 

 

 

rpm 명령어에 -qip 옵션을 추가하여 RPM 패키지를 지정하면 아래와 같이 이름, 버전, 빌드 시간 등의 상세 정보를 확인하실 수 있습니다.

# rpm -qip ntp-4.2.6p5-29.el7.centos.2.x86_64.rpm
Name        : ntp
Version     : 4.2.6p5
Release     : 29.el7.centos.2
Architecture: x86_64
Install Date: (not installed)
Group       : System Environment/Daemons
Size        : 1434385
License     : (MIT and BSD and BSD with advertising) and GPLv2
Signature   : RSA/SHA256, 2020년 06월 24일 (수) 오전 02시 36분 52초, Key ID 24c6a8a7f4a80eb5
Source RPM  : ntp-4.2.6p5-29.el7.centos.2.src.rpm
Build Date  : 2020년 06월 24일 (수) 오전 12시 38분 26초
Build Host  : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.ntp.org
Summary     : The NTP daemon and utilities
Description :
The Network Time Protocol (NTP) is used to synchronize a computer's
time with another reference time source. This package includes ntpd
(a daemon which continuously adjusts system time) and utilities used
to query and configure the ntpd daemon.

Perl scripts ntp-wait and ntptrace are in the ntp-perl package,
ntpdate is in the ntpdate package and sntp is in the sntp package.
The documentation is in the ntp-doc package.

 

 

rpm 명령어의 다양한 옵션을 사용할 수 있으며 아래 링크를 통해 추가적인 옵션을 확인하시기 바랍니다.
https://rpm-software-management.github.io/rpm/man/rpm.8.html

+ Recent posts