CentOS 系统下修改yum本地源:
mkdir /mnt/cdrom/
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bakvi cdrom.repo[name]name=yumgpgcheck=0enabled=1baseurl=file:///mnt/cdrom/ls /etc/yum.repos.d/
cdrom.repo CentOS-Base.repo.bak CentOS-Media.repo加载光盘:
mount /dev/cdrom /mnt/cdrom/
挂载光盘到 /mnt/cdrom/下
执行命令:yum clean all
yum makecache
yum -y install lrzsz
测试安装成功
--------------------------------------
RedHat系统下修改yum本地源:
vi cdrom.repo
[name]name=yumgpgcheck=0enabled=1baseurl=file:///mnt/cdrom/Server修改 :/etc/yum.confgpgcheck=1修改为:gpgcheck=0操作步骤相同。
附件:修改yum本地源的脚本(右键-->目标另存为)
挂载上光盘,执行脚本即可。本文原始链接:http://www.jbxue.com/LINUXjishu/2421.html