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

Configuring the Local Yum Source

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to create the /cdrom directory:
    mkdir /cdrom
  3. Run the following command to mount the OS image package to the /cdrom directory:
    mount /path/to/ISO/CentOS-7-aarch64-Everything-1810.iso /cdrom
  4. Run the following commands to remove all files in the /etc/yum.repos.d directory:
    cd /etc/yum.repos.d
    mkdir bak
    mv *.repo bak
  5. Run the following command to create a Yum source configuration file:
    1. Create a Yum source configuration file.
      vi /etc/yum.repos.d/CentOS-base.repo
    2. Press i to enter the insert mode and add the following content:
      [CentOS7.6-source] 
      Name=CentOS 7.6 Repo 
      baseurl=file:///cdrom
      enabled=1
      gpgcheck=0
    3. Press Esc, type :wq!, and press Enter to save the file and exit.