liunx配置本地yum源

liunx配置本地yum源
  1. 将DVD光盘挂载到/media/cdrom中;
  2.  拷贝/media/cdrom中的所有文件到/home/rhel5;
  3. 修改配置文件/etc/yum.repos.d/rhel-debuginfo.repo如下:
    name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
    baseurl=file:///home/rhel5/Cluster
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [ClusterStorage]
    name=Red Hat Enterprise Linux $releasever - $basearch - ClusterStorage
    baseurl=file:///home/rhel5/ClusterStorage
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [Server]
    name=Red Hat Enterprise Linux $releasever - $basearch - Server
    baseurl=file:///home/rhel5/Server
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [VT]
    name=Red Hat Enterprise Linux $releasever - $basearch - VT
    baseurl=file:///home/rhel5/VT
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
  4.  修改配置文件/usr/lib/python2.4/site-packages/yum/yumRepo.py第411行:
    remote = url + '/' + relative 改为: remote = “/home/rhel5/Server” + '/' + relative
     
  5.  yum clean all  #清理yum源

  6.   yum install iptraf 测试!成功!!!

你可能感兴趣的:(liunx)