首页 > 系统相关 >Centos7 配置清华源

Centos7 配置清华源

时间:2023-08-29 18:14:08浏览次数:37  
标签:清华 centos CentOS 配置 Centos7 mirrorlist releasever basearch yum

1 备份现有的yum源

cd /etc/yum.repos.d/
mkdir bak
mv *.repo /etc/yum.repos.d/bak

2 创建清华yum源

vim /etc/yum.repos.d/QingHua.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=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
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=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
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=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

3 清理并重新加载yum源

yum clean all && yum makecache

标签:清华,centos,CentOS,配置,Centos7,mirrorlist,releasever,basearch,yum
From: https://www.cnblogs.com/lfxx/p/17665552.html

相关文章

  • ubuntu配置
    1、设置root账号密码ubuntu刚安装完镜像是没有密码的,登录进自己创建的账号后需要设置root账户的密码sudopasswd切换root账号suroot2、修改主机名修改hostnamevim/etc/hostname(需重启)hostnamectlset-hostname主机名(不需要重启)修改hostsvim/etc/hosts2、设置以其......
  • Centos7安装VNC
    安装vnc#检查可用版本[root@vnc~]#yum--showduplicateslisttigervnc-server#安装vnc[root@vnc~]#yuminstall-ytigervnc-server#设置密码[root@vnc~]#vncpasswdPassword: #最低六位Verify:Wouldyouliketoenteraview-onlypassword(y/n)?n#是否创建只......
  • Prometheus监控实战系列十二:配置告警规则
    在上篇的文章中,我们通过Grafana实现了监控可视化。而对于运维监控而言,除了监控展示以外,另一个重要的需求无疑就是告警了。良好的告警可以帮助运维人员及时的发现问题,处理问题并防范于未然,是运维工作中不可或缺的重要手段。 在Prometheus的架构中,告警功能由PrometheusServer和A......
  • Prometheus监控实战系列三:配置介绍
    Prometheus使用名为prometheus.yml的配置文件进行设置,通过在启动时指定相关的文件,对配置内容进行加载。该配置文件分为四个模块:global(全局配置)、alerting(告警配置)、rule_files(规则配置)、scrape_configs(目标拉取配置),本文将分别对其进行讲解介绍。一.global 用于定义promethe......
  • Redis介绍跟安装配置
    目录一redis介绍1.1redis是什么1.2redis的特点二centos上安装redis三redis启动方式3.1最简启动3.2动态参数启动(了解)3.3配置文件启动一redis介绍1.1redis是什么开源:早起版本2w3千行基于键值对的存储系统:字典形式多种数据结构:字符串,hash,列表,集合,有序集合高性能,功......
  • 【Element】el-image 预览功能配置
    <el-image:preview-teleported="true"v-for="imginitem.imageList"style="width:100%;height:auto":src="img":preview-src-list="item.i......
  • [chrome]根据不同配置,区分开启/关闭chrome扩展程序
    我的Chrome中安装了很多插件其中一直装着ublockorigin这个去广告插件,很好用但在公司开发商业化广告相关项目,很多内容也会被这个插件屏蔽掉,会影响自己的开发。因为登录的是同一个google账户,扩展会被自动同步。如果能区分设备,在用公司电脑的时候去广告扩展关闭,在家里用电脑时......
  • RTSP/Onvif协议EasyNVR安防视频云平台配置录像阈值实现边删边录需求的具体操作步骤
    EasyNVR是基于RTSP/Onvif协议的视频接入、处理及分发的安防视频云平台,可提供丰富且灵活的视频能力,包括:设备接入、实时视频直播、录像、云存储、录像回放与检索等功能,也能支持GB28181协议进行平台级联。有很多用户咨询我们,在EasyNVR使用过程中,当开启录像时,如果磁盘的存储空间满了,就......
  • 安装python3.5并在QT中配置使用
    一、安装32位的python3.5及各种库链接:https://pan.baidu.com/s/1q94_Vo3XDhfZ_hmssPjz6w提取码:zotf先在dos环境下输入python,如果显示版本则表示python安装成功,安装库文件的时候,在dos环境下进入whl文件所在的目录,然后使用pipinstall***-whl。如果提示pip版本过低,则按照提示更新pip......
  • Oracle PDB配置SID访问
    1、lsnrctlstatus 确保PDB容器监听正常 2、确保PDB容器读写正常sqlplus/assysdbashowpdbs; 3、修改tnsname.ora文件cd /opt/oracle/product/19c/dbhome_1/network/adminvitnsnames.ora(追加,保持原有内容不变,在后面追加下面内容)ORA19CPDB=(DESCRIPTION......