httpd-2.2.15-39.el6.centos.x86_64.rpm
httpd   -      2.2.15-    39.el6.centos.       x86_64 .rpm
软件名称-   软件版本-     发布次数-          硬件平台 扩展名直接安装
[root@lk_Cloud xzdz]# rpm -ivh jdk-8u31-linux-x64.rpm

升级安装

[root@lk_Cloud xzdz]# rpm -Uvh jdk-8u31-linux-x64.rpm

卸载软件包

[root@lk_Cloud xzdz]# rpm -qa | grep vim
vim-minimal-7.2.411-1.8.el6.x86_64
vim-enhanced-7.2.411-1.8.el6.x86_64
vim-common-7.2.411-1.8.el6.x86_64
[root@lk_Cloud xzdz]# rpm -e vim-common-7.2.411-1.8.el6.x86_64

查看包安装信息

[root@lk_Cloud xzdz]# rpm -qi vim-common-7.2.411-1.8.el6.x86_64
Name : vim-common Relocations: (not relocatable)
Version : 7.2.411 Vendor: CentOS
............

列出安装包所使用目录

[root@lk_Cloud xzdz]# rpm -ql vim-common-7.2.411-1.8.el6.x86_64
/etc/vimrc
/usr/bin/xxd
/usr/share/doc/vim-common-7.2.411
/usr/share/doc/vim-common-7.2.411/Changelog.rpm
/usr/share/doc/vim-common-7.2.411/LICENSE
/usr/share/doc/vim-common-7.2.411/README.txt
/usr/share/doc/vim-common-7.2.411/README_ami.txt
.....

查看文件属于哪个包

[root@lk_Cloud xzdz]# rpm -qf /etc/vimrc
vim-common-7.2.411-1.8.el6.x86_64
05-02 19:15