[root@localhost ~]# mkdir /mnt/cdrom
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom/
[root@localhost ~]# ll /mnt/cdrom/
1、进入repos目录,创建repo文件,增加cdrom源
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
redhat.repo
[root@localhost yum.repos.d]# mv redhat.repo redhat.repo.bak
[root@localhost yum.repos.d]# vi iso.repo
[root@localhost yum.repos.d]# cat iso.repo
[base] name=centos baseurl=file:///mnt/cdrom enable=1 gpgcheck=0 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
2、清理yum
yum clean all
3、安装tree命令
yum -y install tree
发表评论