更改CentOS 7更新源为国内阿里云提供的源

简介: 1、备份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2、下载新的CentOS-Base.

1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
//CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
//CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
//CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、之后运行yum makecache生成缓存

作者: Candyメ奶糖

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
博文来源广泛,如原作者认为我侵犯知识产权,请尽快给我发邮件 359031282@qq.com联系,我将以第一时间删除相关内容。

目录
相关文章
|
2月前
|
Linux 开发工具 C语言
Centos8下编译安装最新版ffmpeg解决方案(含Centos8换源阿里云)
Centos8下编译安装最新版ffmpeg解决方案(含Centos8换源阿里云)
177 3
|
5月前
|
Kubernetes Ubuntu 安全
Linux|科普扫盲帖|配置网络软件源---阿里云镜像仓库服务使用(centos,Ubuntu)
Linux|科普扫盲帖|配置网络软件源---阿里云镜像仓库服务使用(centos,Ubuntu)
806 0
|
1月前
记录-- 阿里云centos8 20G硬盘扩容100G
记录-- 阿里云centos8 20G硬盘扩容100G
17 0
|
2月前
|
存储 弹性计算 Linux
阿里云ECS(CentOS镜像)安装docker
阿里云ECS(CentOS镜像)安装docker
417 0
|
8月前
|
XML Java Linux
Linux的CentOS7中安装maven3.6并配置阿里云远程仓库
Linux的CentOS7中安装maven3.6并配置阿里云远程仓库
738 0
Linux的CentOS7中安装maven3.6并配置阿里云远程仓库
|
9月前
|
Linux
阿里云服务器CentOS升级openssl
阿里云服务器 CentOS6默认openssl版本是2013年发布的1.0.1,这里,我们需要升级到2021发布的openssl 1.1.1k版本。
308 0
|
11月前
|
缓存 Linux Windows
【yum是什么?】centos7基于阿里云,配置网络yum
【yum是什么?】centos7基于阿里云,配置网络yum
709 1
|
11月前
|
SQL 关系型数据库 MySQL
阿里云服务器 centos 8 安装MYSQL
阿里云服务器 centos 8 安装MYSQL
|
11月前
|
Linux 网络安全
阿里云CENTOS7 SSH连接失败
阿里云CENTOS7 SSH连接失败
|
11月前
|
安全 网络协议 关系型数据库
linux阿里云服务器centos8操作系统安装mysql8.0详细教程
linux阿里云服务器centos8操作系统安装mysql8.0详细教程
861 0