We all know that yum is a package manager in the CentOS system for downloading and installing software. Sometimes for some reason, you need to use DVD as the default yum source for downloading and installing software on DVD. Let me introduce how CentOS is built as a default yum source.
1, DVD to create a mount directory
[root @ localhost ~] # mkdir /media /CentOS
2, mounted under Linux CentOS DVD (virtual machine mount DVD does not say, should be)
[root@localhost ~]# mount -t auto /dev/cdrom /media/CentOS
3, view related configuration File, directory is
[root@localhost ~]# ls -l /etc/yum.repos.d/
-rw-r--r--. 1 root root 1926 July 3 10:15 CentOS-Base.repo
-rw-r--r--. 1 root root 637 July 3 10:15 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 626 July 3 10:15 CentOS-Media.repo
4, disable yum network update method, simply rename the default preferred CentOS-Base.repo to CentOS-Base.repo.bak
[root@localhost yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
5, configure local yum source
[root@localhost ~]# vim /etc/yum.repos.d/CentOS-Media.repo
Will
[c6-media]
name=CentOS- $releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder /
gpgcheck=1
enabled=0
Modified to
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
gpgcheck=1
enabled=1
where baseurl is modified to hang on DVD Contains directory, enabled=1 turns on local update mode
:wq saves exit
6, clears the original yum information
[root@ Localhost ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning up Everything
7. Check the DVD software list
[root@localhost yum. Repos.d]# yum list
Loaded plugins: fastestmirror
Determining fastest mirrors
c6-media
Linux system network performance can be tested with tools. The main test tools are
When Linux users import multiple files into the database, the discovery process is
Linux which command belongs to the search command, it will be used when you want to find a file, the
Many users encounter problems with normal user permissions when performing Linux system operations,
How does the Linux desktop environment not support HiDPI display?
How Linux mounts iso yum source in virtual machine
Linux refuses foreign IP access steps
Steps to install Kali system on a virtual machine
How Linux uses the alias command
How to make tmux and vim into IDE in Linux system
How to use the w and uptime commands to view Linux system usage
The most complete collection of Linux system shortcuts
Ubuntu disables the shutdown confirmation box step
Linux settings wget download http /https proxy method
How to use the tail command guide under Linux
How Linux uses the kill command to force a process to terminate
How to set Win8.1 Update power button
What should I do if there is garbled characters in the folder after defragmenting the disk in win7?
How to set the prompt information when Win8 sets the mouse to the folder
How to solve the problem of repeated installation of Win10 patch KB3119142?
Solution for font blur when browsing web pages under xp or win7
Some users report that Surface Pro 2 can't install the latest update
MongoDB installation basic tutorial under LInux
How to enter Win7 security mode? Win7 enters safe mode method