[root@localhost ~]# mkdir /root/cdrm/

[root@localhost ~]# mount -o loop /dev/cdrom /root/cdrm/ #挂载光盘镜像

[root@localhost ~]# cd /root/cdrm/Packages/ #进入安装包目录

[root@localhost Packages]# ls -al|wc -l #查看当前目录下安装包的个数

4188

[root@localhost Packages]# ls -al |grep dnsmasq #查找需要的安装包

-r--r--r-- 2 root root   152780 Jun 16  2014 dnsmasq-2.48-14.el6.x86_64.rpm

[root@localhost Packages]# rpm -qa dnsmasq #查看是否安装

[root@localhost Packages]# rpm -ivh  dnsmasq-2.48-14.el6.x86_64.rpm #开始安装

Preparing...                ########################################### [100%]

   1:dnsmasq                ########################################### [100%]

[root@localhost Packages]# rpm -qa dnsmasq #查看

dnsmasq-2.48-14.el6.x86_64

[root@localhost Packages]# rpm -ql dnsmasq #安装包生成的文件

/etc/dbus-1/system.d/dnsmasq.conf

/etc/dnsmasq.conf

/etc/dnsmasq.d

/etc/rc.d/init.d/dnsmasq

/usr/sbin/dnsmasq

/usr/share/doc/dnsmasq-2.48

/usr/share/doc/dnsmasq-2.48/CHANGELOG

/usr/share/doc/dnsmasq-2.48/COPYING

/usr/share/doc/dnsmasq-2.48/DBus-interface

/usr/share/doc/dnsmasq-2.48/FAQ

/usr/share/doc/dnsmasq-2.48/doc.html

/usr/share/doc/dnsmasq-2.48/setup.html

/usr/share/man/man8/dnsmasq.8.gz

/var/lib/dnsmasq

[root@localhost Packages]# rpm -qc dnsmasq #查看包的配置文件

/etc/dbus-1/system.d/dnsmasq.conf

/etc/dnsmasq.conf

[root@localhost Packages]# rpm -ql dnsmasq|grep bin  #查看包生成的二进制文件

/usr/sbin/dnsmasq

[root@localhost Packages]# rpm -e dnsmasq #卸载 

[root@localhost Packages]# cd

[root@localhost ~]# umount /root/cdrm/ #取消挂载