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.
1mount /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.
1mount /dev/sr0 /mnt/
Configuring the Local Yum Repository
Configure the local repository if the server cannot obtain dependencies from the Internet using yum commands.
- Back up the original Yum repository configuration file of the system.
1mv /etc/yum.repos.d /etc/yum.repos.d.bak
- Add the local source file and create the /etc/yum.repos.d directory for the new Yum repository.
1mkdir /etc/yum.repos.d - Go to the /etc/yum.repos.d directory.
1cd /etc/yum.repos.d
- Create a file named local.repo.
- Create a file named local.repo.
1vim local.repo - 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.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create a file named local.repo.
- 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 |

Parent topic: Configuring the Compilation Environment