CentOS yum repository configuration

First, the test preparation

1, CentOS7 image file

2、CentOS7

Second, the experimental procedures

1, first ensure that the image file has been mounted, to see whether there is a desktop CD icon, and the lower right corner of the disc icon above the green light is lit.

2, enter the command line into the file directory yum.repos.d

【 root@hbza~]# cd /etc/yum.repos.d

3, see the file directory by ls command

[ root@hbza yum.repos.d] # rm -rf ./*

Delete files in this directory via the command

4, create a file named CentO.repo

Under the file input line command shown in FIG.

 

 

 

After the input is complete save and close

5, enter the following command to check whether the mount is completed, as in the case shown in this diagram, which represents the mount is completed

[ root@hbza yum.repos.d] yum clean all
[ root@hbza yum.repos.d] yum list


 

Guess you like

Origin www.cnblogs.com/wuwenbin6/p/11693080.html