linux安装教程参考,https://blog.51cto.com/cloudcs/5245337
yum源配置
本地yum源配置:
8版本配置:将光盘iso挂载到某个目录,/dev/cdrom是/dev/sr0软链接,# mount /dev/cdrom /mnt,# ls /mnt
AppStream BaseOS EFI images isolinux media.repo TRANS.TBL
# cd /etc/yum.repos.d/ 全部备份后清空再新建 # vim test.repo
[os]
name = os
baseurl = file:///mnt/BaseOS
gpgcheck = 0
[app]
name = app
baseurl = file:///mnt/AppStream
gpgcheck = 0
清缓存 yum clean all,yum repolist all
7版本配置:将光盘iso挂载到某个目录,# mount /dev/cdrom /mnt,# ls /mnt 有repodata和Packages等目录
# cd /etc/yum.repos.d/ 全部备份后清空再新建 # vim test.repo
[os]
name = os
baseurl = file:///mnt
gpgcheck = 0
在线yum源配置(要能连外网,找到vault过期源)
8版本,# cat abc.repo
[BaseOS]
name = BaseOS
baseurl = https://repo.huaweicloud.com/centos-vault/8.2.2004/BaseOS/x86_64/os/
gpgcheck = 0
[AppStream]
name = AppStream
baseurl = https://mirrors.aliyun.com/centos-vault/8.2.2004/AppStream/x86_64/os/
gpgcheck = 0
7版本,# cat abc.repo
[os]
name = os
baseurl = http://mirrors.aliyun.com/centos-vault/7.6.1810/os/x86_64
gpgcheck = 0