CentOS7.8 换清华源和阿里源
第一步,清空所有repo文件
cd /etc/yum.repos.d/
删除所有文件:
rm -f /etc/yum.repos.d/*
第二步:配置清华源
新建两个文件vim CentOS-Base.repo和vim epel.repo
vim CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
vim epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
添加RPM-GPG-KEY-EPEL-7
curl https://mirrors.tuna.tsinghua.edu.cn/epel/RPM-GPG-KEY-EPEL-7 > /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
运行以下命令生成缓存
yum clean all
yum makecache
配置阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
运行以下命令生成缓存
yum clean all
yum makecache
CentOS7.8 换清华源和阿里源相关推荐
- ubuntu18.04.4 pip3 换清华、阿里、豆瓣 源
文章目录 ubuntu18.04.4 pip3 换源 官方源 清华源 阿里源 豆瓣源 中国科学技术大学源 华中科技大学源 永久换源 1 创建 .pip文件 2 进入文件 3 创建pip.conf文件 ...
- ubuntu20.04 apt-get换国内源 阿里源 163源 清华源 中科大源
1.备份系统自带源 mv /etc/apt/sources.list /etc/apt/sources.list.bak 2.修改/etc/apt/sources.list文件,加入想替换的国内源,我 ...
- ubuntu配置163源和阿里源
ubuntu上使用apt-get时,有时候网络链接会非常慢,这时可以替换源. 1. 保存原始的source.list文件 # sudo mv /etc/apt/source.list /etc/apt ...
- centos7 配置国内yum源和epel源
组合脚本: yum install -y wget cd /etc/yum.repos.d/ mkdir repo_bak mv *.repo repo_bak/ wget http://mirror ...
- 清华源和torch源
没有网络时,pip无法安装,可下载*.whl,再用pip安装 torch源码:https://download.pytorch.org/whl/torch_stable.html 清华源:Simple ...
- Python添加清华源和豆瓣源
Conda添加清华源 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ cond ...
- CentOS7配置阿里云yum源和EPEL源
CentOS7配置阿里云yum源和EPEL源 1.备份 [root@bogon ~]# cd /etc/yum.repos.d/ [root@bogon yum.repos.d]# mkdir rep ...
- Ubuntu 18.04换国内源 中科大源 阿里源 163源 清华源
Ubuntu 18.04换国内源 中科大源 阿里源 163源 清华源 内有很多Ubuntu的镜像源,包括阿里的.网易的,还有很多教育网的源,比如:清华源.中科大源. 我们这里以中科大的源为例讲解如何修 ...
- Ubuntu 20.04换国内源 清华源 阿里源 中科大源 163源
Ubuntu 20.04 是 Ubuntu 的第 8 个 LTS 版本,其重大更新和改进将在 2030 年前终止,计划于2020年 4 月 23 日发布. 国内有很多Ubuntu的镜像源,包括阿里的. ...
最新文章
- 译者招募 | 《Java编程思想》作者Bruce Eckel新作On Java 8
- 其实,我是一名程序员!
- 数据结构与算法JavaScript描述——使用队列
- 大型分布式C++框架《四:netio之请求包中转站 上》
- node.js博客GitHub搭建(hexo)
- OrderOnline——设计概述
- 骚操作!他居然同时给谷歌和 Facebook 上班干活
- [ANSYS APDL] 平面单元应力分析全步骤截图详解
- Pycharm 相关使用方法
- 三个linux系统共存,修改默认启动
- LIBSVM使用方法及参数设置
- [管理]ERP专业术语
- 网络控制播放器(局域网内通过TCP和UDP控制视频播放器)
- Microsemi Libero系列教程(全网首发)
- 聊聊旷厂黑科技 | 手机多摄的终极奥义是“多”吗?
- js-时间相关操作(获取当前日期、最近三天、近一月及前N天的日期)
- Marlin固件之—:基础入门与测试
- centos7安装boot分区_图文详解centos Linux系统安装教程
- 拍照手机哪款好?华为Mate 20 Pro值不值得买
- hisi3559平台PCIE转USB调试