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

Configuring a Yum Source

Configure a Yum source so that you can run the yum command to install or upgrade the software package as required. If the openEuler.repo file already exists in the /etc/yum.repos.d directory, skip the steps in this section.

  1. Open the following file:
    1
    vi /etc/yum.repos.d/openEuler.repo
    
  2. Press i to enter the insert mode and modify the file as follows:
    [OS]
    name=OS
    baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP4/OS/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP4/OS/$basearch/RPM-GPG-KEY-openEuler
    
    [everything]
    name=everything
    baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP4/everything/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP4/everything/$basearch/RPM-GPG-KEY-openEuler
    
    [EPOL]
    name=EPOL
    baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP4/EPOL/main/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP4/OS/$basearch/RPM-GPG-KEY-openEuler
  3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.