0%

Centos 8 挂载本地镜像repo

  • Centos 8 挂载本地镜像repo

安装后命令行界面

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#先挂载本地镜像
mkdir /mnt/cdrom
mount -t auto /dev/cdrom /mnt/cdrom

#验证是否存在
ll /mnt/cdrom

cd /etc/yum.repo.d/
touch local.repo

vi local.repo

[LocalRepo_BaseOS]
name=Centos Linux 8
baseurl=file:///mnt/cdrom/BaseOS
enabled=1
gpgcheck=1
gpgkep=file://etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[LocalRepo_AppStream]
name=Centos Linux 8
baseurl=file:///mnt/cdrom/AppStream
enabled=1
gpgcheck=1
gpgkep=file://etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

#退出 :x

yum clean all
yum makecache

查看grouplist有什么可以安装的
yum grouplist