美文网首页
yum切换源

yum切换源

作者: Nick_4438 | 来源:发表于2022-08-24 21:06 被阅读0次

备份

cd /etc/yum.repos.d
mkdir ~/back
mv * ~/back/

切换源

  • 修改源配置文件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=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
yum clean all
yum makecache

相关文章

  • 切换yum源

    安装wget插件yum install -y wget 切换到原有的yum源目录下cd /etc/yum.repo...

  • 切换yum源

  • yum切换源

    备份 切换源 修改源配置文件vim CentOS-Base.repo

  • Centos系统使用yum安装JDK1.8

    在 yum 源中查找安装包 yum search java-1.8如果找不到安装包, 请切换yum源。具体参考:...

  • Centos yum源切换

    源配置位置 CentOS-Base-repo 这个是当前源配置文件 下载一个配置覆盖上去 如果下载的源还是缺失就手...

  • yum切换国内源

    yum切换国内源 配置dns服务器 配置yum的源 参考链接: yum配置国内源 备份/etc/yum.repos...

  • 腾讯云 centos 7.x 安装 lnmp 环境

    1 将本地的yum源 切换为 阿里云yum源 阿里云 镜像列表 ->找到centos 2 安装php7.1X 使用...

  • centos 7 安装 mysql 5.7

    使用 yum 进行安装添加 mysql yum 源 image.png 切换到 5.7 设置开机启动并启动服务 查...

  • 腾讯云切换yum源

    更换yum源为阿里云 1. 删除自带 删除下面路径下所有文件: 2. 下载阿里源 3. 安装

  • Linux vim注释高亮显示

    首先解决没有vim命令:把yum切换成清华大学的yum源 https://mirrors.cnnic.cn/hel...

网友评论

      本文标题:yum切换源

      本文链接:https://www.haomeiwen.com/subject/fzbogrtx.html