Rate This Document
Findability
Accuracy
Completeness
Readability

(Optional) Configuring the Source

CentOS 7.6

  1. Copy the OS image file CentOS-7-aarch64-Everything-1810.iso to the /root directory on each server.
  2. Mount the image file.
    1. Mount the CentOS .iso file in the /root directory to the /mnt/repo directory on the server.
      1
      2
      mkdir -p /mnt/repo
      mount /root/CentOS-7-aarch64-Everything-1810.iso /mnt/repo -o loop
      

      This operation takes effect only once and becomes invalid after the OS is restarted.

    2. (Optional) Enable the OS image to be automatically mounted upon system startup.
      1. Run the following command to open the fstab file:
        1
        vi /etc/fstab
        
      2. Press i to enter the insert mode and add the following content to the end of the file:
        1
        /root/CentOS-7-aarch64-Everything-1810.iso /mnt/repo iso9660 loop 0 0
        
      3. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Add the local source file.
    1. Go to the /etc/yum.repos.d directory.
      1
      cd /etc/yum.repos.d
      

      You are advised to move the *.repo file in this directory to any other backup directory.

    2. Create a local.repo file.
      1. Run the following command to open the local.repo file:
        1
        vi local.repo
        
      2. Press i to enter the insert mode and add the following content to the local.repo file:
        1
        2
        3
        4
        5
        [local] 
        name=local repo 
        baseurl=file:///mnt/repo 
        enabled=1
        gpgcheck=0
        
      3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Make the local source take effect.
    1
    2
    yum clean all
    yum makecache
    

CentOS 8.1

  1. Mask other sources in the system.
    1
    2
    mkdir -p /etc/yum.repos.d/bak
    mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak
    
  2. Configure the HUAWEI CLOUD source.
    1
    2
    wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-8-reg.repo
    sed -i 's/$releasever/8-stream/g' /etc/yum.repos.d/CentOS-Base.repo
    
  1. Make the local source take effect.
    1
    2
    yum clean all
    yum makecache
    

openEuler 20.03

  1. Copy the OS image file openEuler-20.03-LTS-SP1-everything-aarch64-dvd.iso to the /root directory on each server.
  2. Mount the image file.
    1. Mount the openEuler .iso file in the /root directory to the /mnt/repo directory on the server.
      1
      2
      mkdir -p /mnt/repo
      mount /root/openEuler-20.03-LTS-SP1-everything-aarch64-dvd.iso /mnt/repo -o loop
      

      This operation takes effect only once and becomes invalid after the OS is restarted.

    2. (Optional) Enable the OS image to be automatically mounted upon system startup.
      1. Run the following command to open the fstab file:
        1
        vi /etc/fstab
        
      2. Add the following content to the end of the fstab file:
        1
        /root/openEuler-20.03-LTS-SP1-everything-aarch64-dvd.iso /mnt/repo iso9660 loop 0 0
        
      3. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Add the local source file.
    1. Go to the /etc/yum.repos.d directory.
      1
      cd /etc/yum.repos.d
      

      You are advised to move the *.repo file in this directory to any other backup directory.

    2. Create a local.repo file.
      1. Create a local.repo file.
        1
        vi local.repo
        
      2. Press i to enter the insert mode and add the following content to the local.repo file:
        [Base]
        name=Base
        baseurl=file:///mnt/repo
        enabled=1
        gpgcheck=0
        priority=1
      3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Make the local source take effect.
    1
    2
    3
    yum clean all
    yum makecache
    yum list