# rpm -ivh foo-2.0-4.i386.rpm # rpm -i ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm # rpm -i http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm Erase # rpm -e foo Upgrade # rpm -Uvh foo-1.0-2.i386.rpm # rpm -Uvh ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm # rpm -Uvh http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm
Query
# rpm -qa <------To query all installed packages.
# rpm -q foo <------To query a RPM package.
# rpm -qi foo <------To display package information.
# rpm -ql foo <------To list files in installed package
# rpm -qf /usr/bin/mysql <------Which package owns a file? mysql-3.23.52-3
# rpm -qpl kernel-2.4.20-18.10.1.i686.rpm # rpm -qpl ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm # rpm -qpl http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpmList files in RPM file.
Verify
# rpm --verify mysql
To verify an installed package. The output is listed using the following codes that signify what failed: S File size M Mode (includes permissions and file type) 5 MD5 sum L Symlink D Device U User G Group T Mtime
Take for example the following:
# rpm --verify mysql S.5....T c /etc/my.cnfThis example indicates that file /etc/my.cnf failed on:
File size MD5 Sum Modified TimeHowever, the "c" tells us this is a configuration file so that explains the changes. It should still be looked at to determine what the changes were.
沒有留言:
張貼留言