CentOS6更换有效源

2021-09-0309:14:44
评论
1,725 1824字

前言

CentOS6官方在2020/11/30已停止维护,yum的Base源已失效

操作

 

YUM源

备份文件
cp CentOS-Base.repo CentOS-Base.repo.back
阿里云内网源替换
sed -i 's%mirrors.aliyun%mirrors.cloud.aliyuncs%' /etc/yum.repos.d/CentOS-Base.repo
编辑文件
vim /etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-6.10 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6.10 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6.10 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.10 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6.10 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

epel源

阿里内网源
sed -i 's%mirrors.aliyun%mirrors.cloud.aliyuncs%' /etc/yum.repos.d/epel.repo
编辑文件
vim /etc/yum.repos.d/epel.repo


[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyun.com/epel-archive/6/$basearch
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
 
清理软件源
yum clean all
建立源数据缓存
yum makecache
豌豆日志
  • 本文由 发表于 2021-09-0309:14:44
  • 转载请务必保留本文链接:https://pealog.com/538.html
Liunx基础-DHCP 系统运维

Liunx基础-DHCP

# DHCP简单讲解 DHCP就是动态主机配置协议(Dynamic Host Configuration Protocol)是一种基于UDP协议且仅限用于局域网的网络协议,它的目的就是为了减轻TCP/...
Prometheus监控-BlackExporter部署 系统运维

Prometheus监控-BlackExporter部署

黑盒检测就是监测应用程序的外部,可以查询应用程序的外部特征,比如是否相应开放端口上的轮询并返回正确的数据或响应代码,探测监视的一个实例是执行icmp或者echo检查并确认收到响应,这种类型的探测也称为...
Prometheus监控-AlertManager部署 系统运维

Prometheus监控-AlertManager部署

Alertmanager是一个独立的告警模块,接收Prometheus等客户端发来的警报,之后通过分组、删除重复等处理,并将它们通过路由发送给正确的接收器;告警方式可以按照不同的规则发送给不同的模块负...
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: