Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring a Yum Source

Configuring a Yum Source from the Internet

  1. Back up the Yum source.
    cd /etc/yum.repos.d
    mkdir bak
    mv *.repo bak
  2. Configure the Yum source from the Internet.
    wget -O /etc/yum.repos.d/openEulerOS.repo https://repo.huaweicloud.com/repository/conf/openeuler_aarch64.repo
  3. Make the Yum source take effect.
    yum clean all
    yum makecache
    yum list

Configuring a Local Yum Source

The /home/iso and /home/mnt paths involved in the operations are not default paths. Replace them with actual ones.

  1. Mount the OS image file.
    Method 1:
    1. Upload the OS image file to the /home/iso directory.
    2. In the /home/iso directory, mount the OS image file to the /home/mnt directory.
      mount openEuler-20.03-LTS-SP1-everything-aarch64-dvd.iso /home/mnt

      Modify the ISO file based on the site requirements. The mounting takes effect only once and becomes invalid after restart. You can perform the following operations to automatically mount the OS image file upon system startup:

      • Open the fstab file.
        vi /etc/fstab
      • Add the following content to the end of the fstab file.
        /home/iso/openEuler-20.03-LTS-SP1-everything-aarch64-dvd.iso /home/mnt iso9660 loop 0 0
      • Save and exit the fstab file.

    Method 2:

    1. Use a browser to log in to the BMC and use the KVM to load the OS image file.
    2. Check the device symbol corresponding to the OS image.
      ls /dev/sr*
    3. Mount the OS image file to the /home/mnt directory.
      mount /dev/sr0 /home/mnt
      df -h | grep /home/mnt
      ls /home/mnt/
  2. Back up the Yum source.
    cd /etc/yum.repos.d
    mkdir bak
    mv *.repo bak
  3. Configure a local Yum source.
    1. Go to the /etc/yum.repos.d directory.
      cd /etc/yum.repos.d
    2. Create a local.repo file.
      1. Open the local.repo file.
        vi local.repo
      2. Add the following content to the local.repo file.
        [local]
        name=local.repo 
        baseurl=file:///home/mnt 
        enabled=1
        gpgcheck=0
      3. Save and exit the local.repo file.
      4. View the local.repo file.
        cat local.repo
  4. Make the Yum source take effect.
    yum clean all
    yum makecache
    yum list