Setting up a local yum repository by mounting the system CD method

1, open settings, select the connection

    

 

2, create a directory and mount the CD

   mkdir   /ww

   mount  /dev/cdrom /ww

3, modify the yum configuration file

 

     'Cd /etc/yum.repos.d' file into yum.repos.d

4, vi modify /CentOS-Media.repo into the press i modify mount path / WW , then gpgcheck = 1 to 0 , 0 to 1 = Enabled.

 

 

 

   Press ESC revised exit and enter wq

5. Enter yum list

 

 

 

6, then you can install yum source file

yum install package names -y

 

Guess you like

Origin www.cnblogs.com/ww1234/p/11687622.html