Yum software warehouse configuration
1. Go to your profile directory Yum warehouse depots: /etc/yum.repos.d
.
cd /etc/yum.repos.d
2. Use the Vim editor to create a configuration file named rhel7.repo (the file name can be any, but it must end with .repo)
vim rhel7.repo
Press a/i/o to enter the input mode, the input content is as follows
[rhel7]
name=rhel7
baseurl=file:///media/cdrom
enabled=1
gpgcheck=0
Press esc to exit to command mode, enter :wq
, save and exit.
among them
- name=linuxprobe: Yum warehouse name description
- baseurl=file:///media/cdrom: Provide method FTP, HTTP, local
- enabled=1: Set whether this source is available; 1 is available, 0 is disabled;
- gpgcheck=1: Set whether to check the file for this source; 1 is, 0 is not.
3. Mount the CD according to the configuration path
mkdir -p /media/cdrom
mount /dev/cdrom /media/cdrom
4. Write the mount information to the /etc/fatab file
vim /etc/fstab
/dev/cdrom /media/cdrom iso9660 defaults 0 0
(Note the space between /dev/cdrom and /media/cdrom)
5. Use " yum install httpd
" to check if Yum warehouse is available
Enter the command and use the Yum software repository to install the web service
Complete! The configuration is correct.
At this point, the Yum software warehouse configuration is complete.