配置源

一个人想着一个人 提交于 2019-11-28 05:23:44

配置网络源
vim /etc/yum.repos.d

[epel1]
name = epel
enabled = 1
gpgcheck = 0
baseurl = https://mirrors.aliyun.com/epel/7/x86_64/
cost = 1

[centos]
name = centos base
enabled = 1
gpgcheck = 0
baseurl = http://mirrors.163.com/centos/7/os/x86_64/

----------------------------------------------------------------------------------------------------------------------------

下载docker时 还需要使用到extra和epel源
[extra]
name=centos extra
enabled=1
gpgcheck=0
baseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/


[epel]
name=epel
enabled=1
gpgcheck=0
baseurl=https://mirrors.aliyun.com/epel/7Server/x86_64/

----------------------------------------------------------------------------------------------------------------------------

本地源
[peng]
name=peng1
enabled=1
gpgcheck=0
baseurl=file:///mnt
----------------------------------------------------------------------------------------------------------------------------

如果下载失败 需要写入下面源
https://mirrors.aliyun.com/centos/7/os/x86_64/

----------------------------------------------------------------------------------------------------------------------------

配置后需要加载
yum clean all
yum repolist
mount /dev/cdrom /mnt 挂载

------------------------------------------------------------------------------------
K8s 下载docker 需要配置本地源
[peng]
name=peng1
enabled=1
gpgcheck=0
baseurl=file:///mnt

[os]
name=os
enabled=1
gpgcheck=0
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!