redhat 8 更换yum源 使用centos国内软件源

news/2024/7/4 12:57:24

redhat和centos什么关系,这里就不解释了,直接说如何让redhat也能使用yum或者dnf来安装软件。

#阿里云的源

sudo wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo

sudo dnf update

#清华大学的源  文件内容如下

# 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
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/BaseOS/$basearch/os/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[AppStream]
name=CentOS-$releasever - AppStream
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/AppStream/$basearch/os/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[PowerTools]
name=CentOS-$releasever - PowerTools
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/PowerTools/$basearch/os/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial


#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/os/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial



#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/os/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial



 


http://www.niftyadmin.cn/n/2851430.html

相关文章

tar -zcvf命令_Java开发人员必须掌握的Linux命令(一)

做一个积极的人编码、改bug、提升自己我有一个乐园,面向编程,春暖花开!子曰:“工欲善其事,必先利其器。“1、登录服务器SSH命令简单说,SSH是一种网络协议,用于计算机之间的加密登录。如果一个用…

写一个HTML页面,实现以下功能,左键点击页面时显示“你好”,右键点击时显示“禁止右键”。

<script language"javascript">function click() {if (event.button2) { alert(禁止右键&#xff01;) } if (event.button1) { alert(你好) }}document.οnmοusedοwnclick</script>

用户关系表 存储_列式存储-Apache HBase

简介HBase是一个基于HDFS的、分布式的、面向列(列族)的非关系型数据库&#xff08;NOSQL&#xff09;。HBase的特点1.海量数据存储&#xff0c;HBase表中的数据能够容纳上百亿行*上百万列。2.面向列的存储&#xff0c;数据在表中是按照列进行存储的&#xff0c;能够动态的增加列…

Mysql 5.7 故障恢复处理记录

mysql 数据库是社会普遍认可的非常流行的数据库中间件之一&#xff0c;一套业务系统&#xff0c;数据库的维护也是至关重要的。 应某位网友的要求&#xff0c;我将MySQL 5.7出现故障的恢复的过程记录一下。 问题出现&#xff1a; 2020-05-19T11:48:11.883641Z 0 [ERROR] Inn…

了解XMLHTTP异步调用WebService

眼下AJAX炒的很火&#xff0c;它是javascript和xml的技术结合&#xff0c;异步交互、JavaScript脚本和XML封装数据是AJAX的三大特征。xmlhttp是ms几年前就有的技术了&#xff0c;近年也有不少相近的架构&#xff0c;上篇文章介绍了在客户端用脚本进行WebService调用&#xff0c…

北京大学陈斌教授 python_Python程序设计(胡新明)

Python [paɪθən] 语言&#xff0c;由Guido van Rossum大牛在1990年发明&#xff0c;它是当今世界最受欢迎的计算机编程语言&#xff0c;也是一门对大多数人“学了能用、学了有用、学会能久用”的计算生态语言。本课程的教学目的是使学生具备&#xff1a;通过 Python 程序设计…

ubuntu 18.04-desktop 安装ros 机器人开发环境——筑梦之路

ubuntu 18.04-desktop 安装ros 机器人开发环境需要注意的是这里要安装桌面版系统&#xff0c;ros会涉及到图形程序和建模百度百科的介绍&#xff1a;https://baike.baidu.com/item/ros/4710560?fraladdin#备份自带的软件源 sudo cp /etc/apt/sources.list /etc/apt/sources.l…

Oracle修改SQL语句带时间函数

update 表名 set timeto_date(2012-04-26 03:51:13,yyyy-MM-dd hh24:mi:ss) where id1