Configure local yum on Centos7
Install centos7through VMware.
1. Mount IOS files first
# Mount dev/cdrom mnt/cdromdev/cdrom is the iso file directory selected when centos is installed:
After the mnt/cdrom directory is created, run the mount dev/cdrom mnt/cdrom command to mount it.
2. Go to the/etc/yum. repos. d directory.
# Cd/etc/yum. repos. d
The directory contains the following four files:
The CentOS-Base.repo.bak file is the file I named from, the network yum configured in the base; will be loaded first, won't load the network yum after the name is changed.
3. Edit CentOS-Sources.repo files
[Base-source] name = CentOS-$ releasever-Base Sourcesbaseurl = file: // mnt/cdromgpgcheck = 1 enabled = 1 gpgkey = file: /// mnt/cdrom/RPM-GPG-KEY-CentOS-7 # modify baseurl, gpgkey pointing to the Mount directory, set enabled = 1 indicates enabled.
Now the configuration is complete.