配置源

配置网络源
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/

posted @ 2019-08-22 13:29  openstack彭  阅读(568)  评论(0编辑  收藏  举报