CentOS8配置yum源
本地yum源配置方法
备份/etc/yum.repos.d中的文件
cd /etc/yum.repos.d
touch CentOS-Base.repo
vim CentOS-Base.repo
mount /dev/cdrom /mnt/cdrom 挂载镜像文件
[BaseOS]
name=CentOS-BaseOS
baseurl=file:///mnt/cdrom/BaseOS
gpgcheck=0
enabled=1
[APP]
name=CentOS-APP
baseurl=file:///mnt/cdrom/AppStream
gpgcheck=0
enabled=1
阿里云yum源配置方法 (要有网)
1. cd /etc/yum.repo.d
2. touch CentOS-AppStream.repo CentOS-BaseOS.repo CentOS-Extras.repo
3. 编辑各个文件内容
[AppStream]
name=AppStream
baseurl=https://mirrors.aliyun.com/centos/8.5.2111/AppStream/x86_64/os/
enabled=1
gpgcheck=0
[BaseOS]
name=BaseOS
baseurl=https://mirrors.aliyun.com/centos/8.5.2111/BaseOS/x86_64/os/
enabled=1
gpgcheck=0
4. dnf -y install epel-release
5. dnf clean all
6. dnf makecache
7. dnf repolist