Configuring a Local Source
- Mount the OS image.
mount YOUR_OS.iso /media -o loop
YOUR_OS.iso indicates the image file of the OS in the current environment.
- Configure the local Yum source.
- Create and open the /etc/yum.repos.d/Base.repo file.
vim /etc/yum.repos.d/Base.repo
You need to create the Base.repo file.
- Press i to enter the insert mode and add the following content to the Base.repo file:
[Local] name=CentOS-7.6 Local baseurl=file:///media/ enabled=1 gpgcheck=0
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the Yum source configuration take effect.
yum clean all
yum makecache
- Create and open the /etc/yum.repos.d/Base.repo file.
Parent topic: Configuring the Compilation Environment