CentOS yum换源

1.备份系统自带yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.进入yum源配置文件所目录

cd /etc/yum.repos.d/

3.下载yum源配置文件

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

4.运行yum makecache生成缓存

yum makecache

5.更新

 yum -y update

CentOS源地址

#163

#CentOS5
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo

#CentOS6
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

#CentOS7
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

#aliyun

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

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

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

原文地址:https://www.cnblogs.com/where1-1/p/10399428.html

时间: 2024-08-29 13:25:49

CentOS yum换源的相关文章

【转】Centos yum 换源

[1] 首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup [2] 进入yum源配置文件所在文件夹 [[email protected] yum.repos.d]# cd /etc/yum.repos.d/ [3] 下载163的yum源配置文件,放入/etc/yum.repos.d/(操作前请做好相应备份) [[ema

配置CENTOS YUM更新源(国内)

众所周知,Centos 有个很方便的软件安装工具  yum,但是默认安装完centos,系统里使用的是国外的centos更新源,这就造成了我们使用默认更新源安装或者更新软件时速度很慢的问题. 为了使用yum工具能快速的安装更新软件,我们需要将默认的yum更新源配置为国内的更新源.yum更新源配置文件位于centos目录  /etc/yum.repos.d/  下. 首先提供几个国内快速的更新源: 教育网资源: 1 上海交大: http://ftp.sjtu.edu.cn/centos/ 服务器位

CENTOS YUM更新源

配置CENTOS YUM更新源 众所周知,Centos 有个很方便的软件安装工具  yum,但是默认安装完centos,系统里使用的是国外的centos更新源,这就造成了我们使用默认更新源安装或者更新软件时速度很慢的问题. 为了使用yum工具能快速的安装更新软件,我们需要将默认的yum更新源配置为国内的更新源.yum更新源配置文件位于centos目录  /etc/yum.repos.d/  下. 首先提供几个国内快速的更新源: 教育网资源: 1 上海交大: http://ftp.sjtu.edu

CentOS yum 本地源配置

一 简介 1.1 操作系统     执行 "cat /etc/redhat-release",查看到 操作系统为:CentOS 7 # cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core)      1.2 命令     yum    ? 二 yum本镜像源配置     在有些离线环境中,安装一些软件,通过rpm包安装,可能会出现版本冲突等问题,虽然可以通过 "--force --nodeps" 参

CentOS 8 换源,设置dnf/yum镜像

centos 8 出来已经很久了,可各个镜像站的帮助文档迟迟不更新. 只能自己动手了,这里以阿里云为例 cd /etc/yum.repos.d #备份 cp CentOS-Base.repo CentOS-Base.repo.bak cp CentOS-AppStream.repo CentOS-AppStream.repo.bak cp CentOS-Extras.repo CentOS-Extras.repo.bak sed -i 's/mirrorlist=/#mirrorlist=/g'

CENTOS YUM软件源

CentOS 7.0 使用 YUM 安装 MySQL 报错 问题现象 CentOS 7.0 使用 YUM 安装 MySQL 时出现类似如下错误信息: File contains no section headers. 问题原因 软件源未包含相关软件包. 处理办法 参阅如下步骤,尝试切换到 CentOS 的官方软件源. 1. 编辑源配置文件 /etc/yum.repos.d/epel.repo,将内容修改成下面的内容: [epel] name=Extra Packages for Enterpri

几个国内速度最快的centos yum(更新源)

http://ftp.sjtu.edu.cn/centos/,上海交大,但服务器位于北京,中国教育网网络中心,我看像是朝阳区那边的IP,以前在那边上过班,下载速度高达十M. 北方用户与教育网用户推荐,速度飞快. CentOS版本也挺多,现在用5.2和5.3的用户较新. CenOS-Base.repo:无连接,麻烦手动 http://centos.ustc.edu.cn,中国科技大学,服务器位于合肥. 南方用户推荐. 同样的,CenOS版本非常丰富,适合长期使用. CenOS-Base.repo:

yum换源

1.备份本地yum源 mv  /etc/yum.repos.d/CentOS-Base.repo  /etc/yum.repos.d/CentOS-Base.repo.bak 2.获取阿里yum源 wget  -O  /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 原文地址:https://www.cnblogs.com/minmax329/p/10703711.html

Centos yum的源 设置为阿里云源

在 阿里巴巴镜像站页面,在centos 操作的帮助,有介绍 wget和curl 2种方式来下载CentOS-Base.repo 备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 下载新的CentOS-Base.repo 到/etc/yum.repos.d/ 2.1. CentOS-Base.repo 在阿里巴巴镜像站的链接 CentOS 5: http://mirrors.aliyun