centos8
yum Configuration
I only recommend using the network-based yum.
- Network source: Alibaba yum
centos8wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repocentos7
etc.wget -O /etc/yum.repo.d/CentOS-Linux-BaseOS.repo http://mirrors.aliyun.com/repo/Centos-8.repo - Local yum mounting: it’s slow, not recommended.
- Step one:
- Check whether the DVD drive is connected; you can use
lsblk dfto view it.
- Check whether the DVD drive is connected; you can use
- Step two:
- Create a mount point with
mkdir /mnt/a, then mount it usingmount /dev/cdrom /mnt/a - Use
df -hT /mnt/ato view the mount record.
- Create a mount point with
- Step three:
- Use
cd /etc/yum.repo.d/to go to the yum configuration directory. - mkdir /aa
- Back up by running
mv *.repo aa - Copy out a yum.base.repo using
cp -p .(the dot here means the current directory)
- Use
- Step four:
- vim /etc/yum.Base.repo
- Change the directory to the mount point you created.
- Press wq to save.
Too much hassle — just use a network source instead.
If you enjoyed this, leave a comment~