Centos 7配置阿里云yum源

简介: Centos 7配置阿里云yum源

Centos 7配置阿里云yum源

wget http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.6.repo

  1. 禁用 yum插件 fastestmirror

1)修改插件的配置文件

cp /etc/yum/pluginconf.d/fastestmirror.conf /etc/yum/pluginconf.d/fastestmirror.conf.bak

vi /etc/yum/pluginconf.d/fastestmirror.conf

enabled = 1 //由1改为0,禁用该插件

2)修改yum的配置文件

cp /etc/yum.conf /etc/yum.conf.bak

vi /etc/yum.conf

plugins=1 //改为0,不使用插件

yum clean all

  1. 获取阿里云 repo
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    或者
    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

cp /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.bak
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3.清理原来的缓存,重新缓存

yum clean all

yum makecache

yum update

完工

目录
相关文章
|
缓存 Ubuntu 前端开发
Linux配置yum源以及基本yum指令
Linux配置yum源以及基本yum指令
Yum工具详解(二)-----Yum配置阿里源
Yum工具详解(二)-----Yum配置阿里源
6534 1
|
缓存 Linux 开发工具
CentOS 7- 配置阿里镜像源
阿里镜像官方地址http://mirrors.aliyun.com/ 1、点击官方提供的相应系统的帮助 :2、查看不同版本的系统操作: 下载源1、安装wget yum install -y wget2、下载CentOS 7的repo文件wget -O /etc/yum.
280408 0
|
2月前
|
缓存 Linux
Centos 7配置阿里云yum源
Centos 7配置阿里云yum源
342 0
|
Linux 应用服务中间件 网络安全
CentOS7搭建本地离线局域网yum源(Httpd/Nginx+yum)
CentOS7搭建本地离线局域网yum源(Httpd/Nginx+yum)
4985 0
|
安全 Linux
安装EPEL Repository Centos 7.9
记住,行走在Linux的世界,把“学习”作为你不可或缺的随身宝典。今天你学会了如何将EPEL这座外来的宝库接入你的系统,明天,你或许就能在这座宝库中发现一款能领你走向Linux大师之路的神器。
1338 7
|
安全 Linux
CentOS下载ISO镜像的方法
访问CentOS官方网站(https://www.centos.org/download/),在“Downloads”页面找到ISO镜像下载链接,选择所需版本和架构(如x86_64)开始下载。CentOS分为Linux版和Stream版,前者每两年发行一次并提供10年安全维护,后者为滚动更新。旧版本可在Vault(https://vault.centos.org/)下载。建议选择DVD格式镜像,包含完整系统和常用软件。
41326 16
CentOS下载ISO镜像的方法
|
Linux 虚拟化 开发者
一键将CentOs的yum源更换为国内阿里yum源
一键将CentOs的yum源更换为国内阿里yum源
24549 31
|
缓存 Linux
解决CentOS 7停止更新后yum源失效问题【图文教程】
以上步骤完成后,你的 CentOS 7 系统就会使用阿里云的 yum 源,更换yum以后就可以正常使用啦。
16870 2
|
Linux
CentOS 7 配置yum阿里源 (三步即可)
CentOS 7 配置yum阿里源 (三步即可)
37255 1