CentOS 8 安装更新国内清华大学源手记【亲测成功】
一直和各种OS打交道,仍觉得自己是小白,故深知小白们的困惑和蛋碎,特此将安装更新源的细节和步骤做了详细整理,供大家参考。红字是命令和提示,深灰色代码框中是源配置,本文采用了清华大学CentOS 8的源,按提示操作可成功,祝你好运!Good Luck!
转载请注明出处:
首先备份 cd /etc/yum.repos.d/
[tony@localhost home]$ su
Password: 【输入root用户的密码获取root用户权限】
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
【PS:在有的版本CentOS 8 安装完成后在源目录“/etc/yum.repos.d/” 中并没有 CentOS-Base.repo 这个文件,可能报错,那么直接用vi命令创建这个文件,并粘贴本文所附的源代码,继续往下执行即可】
[root@localhost yum.repos.d]# ll
total 56
-rw-r--r--. 1 root root 731 Mar 12 15:15 CentOS-AppStream.repo
-rw-r--r--. 1 root root 2100 Apr 10 07:19 CentOS-Base.repo
-rw-r--r--. 1 root root 798 Mar 12 15:15 CentOS-centosplus.repo
-rw-r--r--. 1 root root 1043 Mar 12 15:15 CentOS-CR.repo
-rw-r--r--. 1 root root 668 Mar 12 15:15 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 743 Mar 12 15:15 CentOS-Devel.repo
-rw-r--r--. 1 root root 756 Mar 12 15:15 CentOS-Extras.repo
-rw-r--r--. 1 root root 338 Mar 12 15:15 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 738 Mar 12 15:15 CentOS-HA.repo
-rw-r--r--. 1 root root 928 Mar 12 15:15 CentOS-Media.repo
-rw-r--r--. 1 root root 736 Mar 12 15:15 CentOS-PowerTools.repo
-rw-r--r--. 1 root root 1382 Mar 12 15:15 CentOS-Sources.repo
-rw-r--r--. 1 root root 74 Mar 12 15:15 CentOS-Vault.repo
-rw-r--r--. 1 root root 173 Apr 10 06:47 google-chrome.repo
[root@localhost yum.repos.d]#
创建CentOS-Base.repo 文件并写入源配置:
[root@localhost yum.repos.d]# vi 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.
#
#
[BaseOS]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[AppStream]
name=CentOS-$releasever - AppStream
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[PowerTools]
name=CentOS-$releasever - PowerTools
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
"ESC"键,输入:"wq" 保存并退出vi编辑器,然后执行下面的命令重新编译源缓存并执行更新操作:
[root@localhost yum.repos.d]# yum makecache
[root@localhost yum.repos.d]# yum -y update
CentOS 8 安装更新国内清华大学源手记【亲测成功】的更多相关文章
- MacOS VMware Function安装win的ghost系统(亲测成功!!!)
1.下载WEPE工具生成可启动ISO 下载WEPE工具 WEPE工具下载地址 下载完成之后,双击打开文件(无需安装,可直接制作可启动ISO) 点击立即生成ISO之后 2.将生成的可启动ISO文件和wi ...
- Ubuntu 更新国内镜像源失败
Ubuntu 更新国内镜像源失败 首先打开系统原来的/etc/apt/sources.list 查看,原来的仓库地址是 https 还是 http 如果是http那么说明本机的 CA 证书有问题,运行 ...
- Caffe初学者第一部:Ubuntu14.04上安装caffe(CPU)+Python的详细过程 (亲测成功, 20180524更新)
前言: 最近在学习深度学习,最先要解决的当然是开源框架的环境安装了.之前一直在学习谷歌的Tensorflow开源框架,最近实验中需要跟别人的算法比较,下载的别人的代码很多都是Caffe的,所以想着搭建 ...
- eclipse 安装 activiti-designer-5.18.0,亲测成功
转: eclipse 安装 activiti-designer-5.18.0,亲测成功 2018年06月02日 15:50:05 ldw4033 阅读数:2826 版权声明:本文为博主原创文章,未 ...
- cordova-plugin-alipay-v2使用篇(更新至20170725)(亲测可用)
cordova-plugin-alipay-v2使用篇(更新至20170725)(亲测可用) alipaySdk已更新至20170725版本 支付宝WS_APP_PAY_SDK_BASE_2.0 &l ...
- 【CentOS】安装RPM包或者源码包
一.rpm (是Redheat Package Manager的简称) 如果光驱中还有系统安装盘的话, 1.先挂载光驱, mount /dev/cdrom /mnt/ 2.cd /mnt/ 3.cd ...
- CentOS7配置更新国内yum源
备份本地yum源文件 cd /etc/yum.repo.d/ mv CentOS-Base.repo CentOS-Base.repo.bakeup 下载国内yum源 阿里云yum源 wget htt ...
- python pip 安装使用国内镜像源
国内镜像源 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 ...
- Ubuntu16.04 下如何安装和卸载Google Chrome【亲测有效】
一.安装 1.将下载源添加到系统源中. sudo wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/sources.li ...
- ArcGIS Desktop 10.1+ArcEngine10.1完全破解安装教程(含下载地址+亲测可用!)
最近在二次开发中用到了VS2010+ArcGIS的二次开发模式,因为之前的某些原因,对ArcGIS的接触甚少.初次安装也遇到了很多问题,这里做一个总结. 系统环境 win732位操作系统 需要文件 ( ...
随机推荐
- 基于Ant Design设计语言的WinForm UI界面库
前言 经常在技术群里看到有小伙伴提问:WinForm有什么好看.开源的UI库推荐的吗?,今天大姚给大家分享一款基于Ant Design(使用Ant Design 5.0)设计语言.开源(Apache ...
- spring Cloud 有哪些组件?
Eureka:服务注册与发现,每个服务都向eureka提供自己的ip地址,端口号,协议,通信协议,eureka将各个服务维护到一个服务清单中(双层map,第一层key为服务名,第二层key为实例名), ...
- Redis基础_五大数据类型和常用命令
## 1. Redis基本介绍 1.1 传统数据存储出现的问题 海量用户 高并发 罪魁祸首--关系型数据库: 性能瓶颈:磁盘IO性能低下 扩展瓶颈:数据关系复杂,扩展性差,不便于大规模集群 解决思路 ...
- PbRL | Preference Transformer:反正感觉 transformer 很强大
论文题目:Preference Transformer: Modeling Human Preferences using Transformers for RL,ICLR 2023,5 6 6 8, ...
- Nessus 离线安装
Nessus是渗透测试用来进行漏洞扫描的一款经常使用的工具,除此之外还是用AWVS ,APPScan后面在介绍.今天先把Ness如何离线安装到自己本机步骤说明. 安装步骤: 1.下载Nessus 官网 ...
- 【技术积累】Java 8 新特性
一.Lambda表达式 Lambda 是一个匿名函数,我们可以把 Lambda表达式理解为是一段可以传递的代码(将代码像数据一样进行传递).可以写出更简洁.更灵活的代码.作为一种更紧凑的代码风格,使J ...
- vscode 利用正则 搜索标签 tags (?=.*关键字1)(?=.*关键字2).*
vscode 利用正则 搜索标签 (?=.关键字1)(?=.关键字2).* 这里关键词是可以多个并且不按照顺序搜索的,就是写起来需要 (?=.关键字) 最后. 结尾 我是不是需要制作一个转换的小工具呢 ...
- 英语单词组件- 单词在句子中,上面显示中文下面显示音标 css样式
原先效果: 改进demo效果 优化点 音标长度超出,或者中文超出,总宽度会按照最长的走 居中显示 再次优化 line-height: 22px; 加入这个 对齐中间行(字号大小会让绝对上下高度,对不齐 ...
- pollute 污染 pol=por=pro 向前 lut=释放 结合ps软件里面lut概念记忆
pollute 污染 pol = por = pro = 向前 lut = 释放 (ps里面有lut的概念) e 动词 向前释放 -> 污染 弄脏 简单记忆 poll / ute poll - ...
- 【深度学习基础】基于Numpy的循环神经网络实现和反向传播训练
本文是<深度学习进阶:自然语言处理>.<神经网络与深度学习>和<动手学深度学习>的读书笔记.本文将介绍基于Numpy的循环神经网络的前向传播和反向传播实现,包括RN ...