我要评分
获取效率
正确性
完整性
易理解

Configuring the Yum Source

Configure the local Yum source.

  1. Create a directory for mounting the Yum source.
    1
    mkdir /mnt/repo
    
  2. Mount the ISO file.
    1
    mount -o loop /home/iso/CentOS-7-aarch64-Everything-1810.iso /mnt/repo
    
  3. Back up the Yum source file.
    1
    2
    3
    cd /etc/yum.repos.d
    mkdir backup
    mv *.repo backup
    
  4. Edit the local.repo file.
    1
    vim /etc/yum.repos.d/local.repo
    

    Add the following content to the file:

    1
    2
    3
    4
    5
    6
    [local]
    name=local
    baseurl=file:///mnt/repo
    enable=1
    gpgcheck=0
    gpgkey=file:///mnt/repo/RPM-GPG-KEY-CentOS-7
    
  5. Clear all the cached content.
    1
    yum clean all
    
  6. Build a cache.
    1
    yum makecache