How does CentOS use CD-ROM to add and remove programs

  

1, create a mount directory

mkdir /mnt/cdrom

2, mount disc file mount -o loop /dev/cdrom /mnt/Cdrom (cdrom is the CD-ROM drive, please confirm it yourself)

3, edit repoa, mkdir /etc/yum.repos.d/temp (create temp backup directory)

b, remove the file and Back up to the temp directory mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/temp/

c, copy CentOS-Base.repo to the original directory cp /etc/Yum.repos.d/temp/CentOS-Base.repo /etc/yum.repos.d/

d, modify the CentOS-Base.repovi etc/yum.repos.d/CentOS-Base.repo annotation Remove all lines starting with baseurl or mirrorlist in CentOS-Base.repo and add the following line to each item: baseurl=file:///mnt/cdrom to save and exit.

e, restart yum-updatesd service service yum-updatesd restart

3, use the shell to type the command system-config-packages

Copyright © Windows knowledge All Rights Reserved