005-RPM的使用

瞭解rpm ,會幾項常用的命令既可html

安裝,查看包的信息,卸載,查看包的絕對路徑,包的升級centos

查看系統安裝的全部包

[root@Carlton scripts]# rpm -qa |head
dosfstools-3.0.9-4.el6.x86_64
libXxf86vm-1.1.3-2.1.el6.x86_64
gdbm-devel-1.8.0-39.el6.x86_64
basesystem-10.0-4.el6.noarch
nautilus-extensions-2.28.4-26.el6.x86_64
usermode-gtk-1.102-3.el6.x86_64
glibc-devel-2.12-1.209.el6_9.1.x86_64
gvfs-smb-1.4.3-27.el6.x86_64
xkeyboard-config-2.16-1.el6.noarch
perl-devel-5.10.1-144.el6.x86_64

安裝一個包

[root@localhost ~]# rpm -ivh /mnt/Packages/libjpeg-turbo-devel-1.2.1-1.el6.i686.rpm
Preparing...                ########################################### [100%]
   1:libjpeg-turbo-devel    ########################################### [100%]

升級一個包

rpm -Uvh 

卸載一個包

rpm -e filename

查詢一個包是否有安裝

[root@Carlton scripts]# rpm -q lrzsz
lrzsz-0.12.20-27.1.el6.x86_64
[root@Carlton scripts]# rpm -q lrzs
package lrzs is not installed

列出一個包安裝的文件

[root@Carlton scripts]# rpm -ql lrzsz
/usr/bin/rb
/usr/bin/rx
/usr/bin/rz
/usr/bin/sb
/usr/bin/sx
/usr/bin/sz
/usr/share/locale/de/LC_MESSAGES/lrzsz.mo
/usr/share/man/man1/rz.1.gz
/usr/share/man/man1/sz.1.gz

經過包安裝的地址找到包名

[root@Carlton scripts]# rpm -qf /usr/bin/rx
lrzsz-0.12.20-27.1.el6.x86_64
[root@Carlton scripts]# rpm -qf /usr/bin/
filesystem-2.4.30-3.el6.x86_64
[root@Carlton scripts]# rpm -qf /usr/bin/rb
lrzsz-0.12.20-27.1.el6.x86_64

查看安裝包的基本信息

[root@Carlton scripts]# rpm -qi lrzsz
Name        : lrzsz                        Relocations: (not relocatable)
Version     : 0.12.20                           Vendor: CentOS
Release     : 27.1.el6                      Build Date: Thu 19 Aug 2010 02:20:40 PM CST
Install Date: Fri 04 Aug 2017 03:08:49 PM CST      Build Host: c6b3.bsys.dev.centos.org
Group       : Applications/Communications   Source RPM: lrzsz-0.12.20-27.1.el6.src.rpm
Size        : 162901                           License: GPLv2+
Signature   : RSA/8, Sun 03 Jul 2011 12:43:30 PM CST, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL         : http://www.ohse.de/uwe/software/lrzsz.html
Summary     : The lrz and lsz modem communications programs
Description :
Lrzsz (consisting of lrz and lsz) is a cosmetically modified
zmodem/ymodem/xmodem package built from the public-domain version of
the rzsz package. Lrzsz was created to provide a working GNU
copylefted Zmodem solution for Linux systems.
相關文章
相關標籤/搜索