标签:
一、软件包:
一、rpm
[root@hadoop09-linux ~]# mount /dev/cdrom1 /media/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@hadoop09-linux ~]# rpm -qa # -a all -q query
openssh-server-5.3p1-84.1.el6.x86_64
poppler-0.12.4-3.el6_0.1.x86_64
festvox-slt-arctic-hts-0.20061229-18.el6.noarch
dejavu-fonts-common-2.30-2.el6.noarch
[root@hadoop09-linux Packages]# rpm -qa | grep "^bind$"
[root@hadoop09-linux Packages]# # 没有被安装
[root@hadoop09-linux Packages]# ll | grep "bind"
-r--r--r--. 2 root root 4157992 Feb 23 2013 bind-9.8.2-0.17.rc1.el6.x86_64.rpm
[root@hadoop09-linux Packages]# rpm -ivh bind-9.8.2-0.30.rc1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:bind ########################################### [100%]
[root@hadoop09-linux shell]# rpm -ql `rpm -qa | grep "bind-9.8.2-0.30.rc1.el6.x86_64"`
/etc/NetworkManager/dispatcher.d/13-named
/etc/logrotate.d/named
/etc/named
/etc/named.conf
/etc/named.iscdlv.key
/etc/named.rfc1912.zones
[root@hadoop09-linux Packages]# rpm -qf /etc/ntp.conf
ntp-4.2.6p5-10.el6.centos.1.x86_64
8. 卸载
[root@hadoop09-linux Packages]# rpm -e 文件名 # 不用带后缀
二、yum
[root@hadoop09-linux Packages]# yum list | grep "@" #得到结果中base为仓库名,@代表已安装
[root@hadoop09-linux Packages]# yum -y install httpd-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
[root@hadoop09-linux Packages]# yum list | grep "httpd-devel" | grep "@"
httpd-devel.x86_64 2.2.15-54.el6.centos @updates
[root@hadoop09-linux Packages]# yum -y remove httpd-devel
标签:
原文地址:http://www.cnblogs.com/eRrsr/p/5851411.html