YUM配置过程:

1.挂在光盘,拷贝文件

mount /dev/cdrom  /mnt

mkdir /local_yum_source

cp -a /mnt/*   /local_yum_source/

 

2.创建自己的repo文件

vim /etc/yum.repos.d/local.repo

[local_yum_source]

    name=my_local_source

    baseurl=file:///local_yum_source

    gpgcheck=0

    enable=1

 

3.修改YUMREPO.PY文件

vim /usr/lib/python2.6/site-packages/yum/yumRepo.py

把728行的

   remote=url+'/'+relatice变成remote=url+'/local_yum_source'+relatice

 

4.清理YUM缓存

yum clean all