1. Create a directory
mkdir /mnt/cdrom
2. mount your cdrom file.
2.1 drive way
The drive mode adopted for vmware user can directly use the mirror shown in FIG.
sudo mount /dev/cdrom /mnt/cdrom
Then go to the directory, as long as the file description listed below Mount success.
2.2 adopt mount the iso image file
First you have to iso files to your centos above, there can only think of a way slightly. No network with U-disk, not with u disk drive. In conclusion was reached corresponding to a directory
and then use the mount command to mount the file operation. The difference is that there is no argument -o
mount -o loop /mnt/iso/CentOS-8-x86_64-1905-dvd1.iso /mnt/cdrom
3 enter /etc/yum.repos.d directory
cd /etc/yum.repos.d
4. Open the file CentOS-Media.repo
sudo vi CentOS-Media.repo
Modify the file as follows, modifications six places
baseurl, BaseOS AppStream directory and directory specified mount
gpgcheck i.e. not check
enabled enable the mirror
3. The shield default image
vim into the following three files, then modify the enabled = 0
approximately as shown, but there is a problem, if in the future want to use the network installation package the way, remember to re-modify here is 1 that is re-enabled.
3.yum clean all
Clear cache
sudo yum clean all
4.yum makecache
Rebuild cache
sudo yum makecache
The results demonstrate
Just search for what package a try.
yum search openssh If not, indicating that the configuration is ok
6. Automatic Power hanging plate
In order to avoid after the restart, the mirror can not access the source of the problem. We need to configure the operation of hanging plate in our / etc / fstab file
6.1 Use mount -l to view the information we hang the plate
5 can be obtained from the above information
/ dev / cdrom / mnt / cdrom iso9660 defaults 0 0
in fact be written as
/ dev / cdrom / mnt / cdrom auto defaults 0 0
The device name is a link I passed through, where you can fill in sr0 just fine, but I still write / dev / cdrom