mkdir /mnt/cdrom/
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
vi cdrom.repo
[name]
name=yum
gpgcheck=0
enabled=1
baseurl=file:///mnt/cdrom/
ls /etc/yum.repos.d/
cdrom.repo CentOS-Base.repo.bak CentOS-Media.repo
加载光盘
执行命令:
yum clean all
yum makecache
yum -y install lrzsz
测试安装成功
--------------------------------------
redhat系统下修改yum本地源:
修改 :/etc/yum.conf
gpgcheck=1
修改为:
gpgcheck=0
操作步骤相同。