命令操作如下所示:
[root@localhost ~]# umount /dev/cdrom //先卸掉其自动挂载 [root@localhost ~]# mount /dev/cdrom /media/ mount: block device /dev/sr0 is write-protected, mounting read-only [root@localhost ~]# mount | tail -1 /dev/sr0 on /media type iso9660 (ro) [root@localhost ~]#Yum客户端需编辑配置文件,命令操作如下所示:
[root@localhost ~]# cd /etc/yum.repos.d/ //必须在这个路径下 [root@localhost yum.repos.d]# ls //此路径下事先有配置文件的模板 rhel-source.repo [root@localhost yum.repos.d]# cp rhel-source.repo rhel6.repo //配置文件必须以.repo结尾 [root@localhost yum.repos.d]# vim rhel6.repo [rhel-6] //中括号里内容要求唯一,但不要出现特殊字符 name=Red Hat Enterprise Linux 6 //此为描述信息,可以看情况填写 baseurl=file:///media/ //此项为yum软件仓库位置,指向光盘挂载点 enabled=1 //此项为是否开启,1为开启0为不开启 gpgcheck=1 //此项为是否检查签名,1为监测0为不检测 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release //签名认证信息的路径 …… "rhel6.repo" 6L, 145C 1,1 全部 [root@localhost /]# yum repolist Loaded plugins: product-id, refresh-packagekit, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. rhel-6 | 3.9 kB 00:00 ... rhel-6/primary_db | 3.1 MB 00:00 ... repo id repo name status rhel-6 Red Hat Enterprise Linux 6 3,690 repolist: 3,690 [root@localhost /]#命令操作如下所示:
[root@localhost /]# yum list | grep firefox This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. firefox.x86_64 17.0.10-1.el6_4 @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5 firefox.i686 17.0.10-1.el6_4 rhel-6 [root@localhost /]#命令操作如下所示: [root@localhost /]# yum -y install bind
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be erased --> Finished Dependency Resolution Dependencies Resolved ……命令操作如下所示:
[root@localhost ~]# less /root/install.log ……