VMware version 15.5 builds yum warehouse by mounting the system CD

VMware version 15.5 builds yum warehouse by mounting the system CD
.
1. Open the CentOS 7 virtual machine.

 

 2. Log in to the virtual machine, choose not listed User name: root Password: enter the password you set and click login.

 

 

 

 3. Right-click to open the terminal.

 

 4. Enter the cd .. command twice to return to the root directory.

 

 5. Create a directory named chenzishuo, enter mkdir /chenzishuo in the terminal

 

 6. Configure the local yum, mount the CD under Chen Zishuo, enter mount /dev/cdrom /chenzishuo in the terminal

 

 7. Enter the yum.repos.d file, enter cd /etc/yum.repos.d in the terminal, and then enter the command ls to open the current folder.

 

 8. Enter the input command in the terminal:

mv CentOS-Base.repo CentOS-Base.repo.bak

mv CentOS-Debuginfo.repo CentOS-Debuginfo.repo.bak

mv CentOS-Vault.repo CentOS-Vault.repo.bak

mv CentOS-CR.repo CentOS-CR.repo.bak

mv CentOS-fasttrack.repo CentOS-fasttrack.repo.bak

mv CentOS-Sources.repo CentOS-Sources.repo.bak


9. Open the CentOS-Media.repo file and enter the command vi CentOS-Media.repo in the terminal

 

 10. Modify the contents of the current file.

 

Change to: baseurl = file: ///chenzishuo

gpgcheck = 0

enabled = 1

Finally press esc and shift and: enter wq to save and exit

 

 11. Enter the command yum list in the terminal

 

 12. Wait for a while, these appear in the list, indicating that the Yum local warehouse has been successfully built.

 

 

 

 



Guess you like

Origin blog.csdn.net/qq_45533926/article/details/112727934