Upload the CentOS7 iso file to the/media/directory, create a new directory/media/cdrom, and attach the ISO file to the/media/cdrom;
Mount-t iso9660/media/centos-7.0-1406-x86_64-dvd.iso/media/cdrom/can also place this command in the boot-up entry to automatically mount the boot.
2. Create a new file Centos-media.repo under the/etc/yum.repos.d/path and copy the following to the file;
# centos-media.repo#[c6-media]name=centos-$releasever-mediabaseurl=file:///media/cdromgpgcheck=1enabled=1gpgkey =file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-7# If you do not need gpgcheck, you can let gpgcheck=0, and then comment out the last line.
3. Next, you can install the software from the local CD source with the Yum command.
End.
This article is from the "Feng Xuewei blog" blog, make sure to keep this source http://hsuehwee.blog.51cto.com/10114119/1632805
CentOS7 how to make a yum source with a local CD