Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring the Local Yum Repository

Mounting the OS Image

Mount the OS image using either of the following methods:

  • Upload the OS image to the /home directory and mount the image to the /mnt/ directory.
    1
    mount /home/CentOS-7-aarch64-Everything-1810.iso /mnt/
    

    Change the .iso file name as required. The operation takes effect only once and becomes invalid after the restart of the OS.

  • Use the KVM to mount the OS image to the /mnt/ directory. If the system displays a message indicating that no image is available after you run the command, mount the image again and then run the command.
    1
    mount /dev/sr0 /mnt/
    

Configuring the Local Yum Repository

Configure the local repository if the server cannot obtain dependencies from the Internet using yum commands.

  1. Back up the original Yum repository configuration file of the system.
    1
    mv /etc/yum.repos.d /etc/yum.repos.d.bak
    
  2. Add the local source file and create the /etc/yum.repos.d directory for the new Yum repository.
    1
    mkdir /etc/yum.repos.d
    
  3. Go to the /etc/yum.repos.d directory.
    1
    cd /etc/yum.repos.d
    
  4. Create a file named local.repo.
    1. Create a file named local.repo.
      1
      vim local.repo
      
    2. Press i to enter the insert mode and add the following content to the local.repo file:
      [local]
      name=local.repo
      baseurl=file:///mnt
      enabled=1
      gpgcheck=0

      Example:

      The file path specified by baseurl indicates the directory to which the image is mounted, that is, the /mnt directory in Mounting the OS Image.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Make the local source take effect.
    1
    2
    yum clean all
    yum makecache
    

Installing OS Dependencies

Install dependencies.
1
yum -y install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr bison libtool zlib-devel libgcrypt-devel libcurl-devel crypt* libgcrypt* python-sphinx openssl imake libxml2-devel expat-devel ncurses5-devel ncurses-devle vim-common libgpg-error-devel libidn-devel
1
yum -y install bison ncurses ncurses-devel libaio-devel openssl openssl-devel gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel wget tar gcc gcc-c++ git rpcgen cmake