美文网首页
centos7yum源配置

centos7yum源配置

作者: waypec | 来源:发表于2021-06-10 14:52 被阅读0次

1.配置 阿里云镜像仓库

1.备份

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.下载

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3.清除缓存

yum clean all     # 清除系统所有的yum缓存
yum makecache     # 生成yum缓存

2、配置 清华大学镜像仓库(推荐)

地址: https://mirrors.cnnic.cn/

1.备份

cp /etc/yum.repos.d/CentOS-Base.repo  /etc/yum.repos.d/CentOS-Base.repo.bak

2.之后启用 TUNA 软件仓库, 将清华大学镜像仓库信息写入 /etc/yum.repos.d/CentOS-Base.repo

sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
         -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://mirrors.tuna.tsinghua.edu.cn|g' \
         -i.bak \
         /etc/yum.repos.d/CentOS-*.repo

3.清除缓存

yum clean all     # 清除系统所有的yum缓存
yum makecache     # 生成yum缓存

3.epel源 安装和配置

(1)、查看可用的epel源

yum list | grep epel-release

(2)、安装 epel

yum install -y epel-release

(3)、配置阿里镜像提供的epel源

wget -O /etc/yum.repos.d/epel-7.repo  http://mirrors.aliyun.com/repo/epel-7.repo

(4)、清除缓存

yum clean all     # 清除系统所有的yum缓存
yum makecache     # 生成yum缓存

4.查看yum源

查看所有的yum源:

yum repolist all

查看可用的yum源:

yum repolist enabled

相关文章

  • yum源的配置

    centos7yum源配置 本地yum源 网络yum源vim CentOS-Base.repo 后续会更新ubun...

  • centos7yum源配置

    1.配置 阿里云镜像仓库 1.备份 2.下载 3.清除缓存 2、配置 清华大学镜像仓库(推荐) 地址: https...

  • Centos7+php7.2+swoole

    Centos7Yum安装PHP7.2 1、安装源安装php72w,是需要配置额外的yum源地址的,否则会报错不能找...

  • centos7创建openstack的yum源

    一、 环境简介与说明: 1. 环境简介: 系统:centos7yum源:openstack-queens关闭...

  • 修改npm配置源

    设置配置源(配置淘宝的源) 查看配置源信息

  • Centos Issue

    CentOS配置本地Yum源、阿里云Yum源、163Yum源、并配置Yum源的优先级

  • springboot配置多数据源

    springboot配置多数据源 1.配置数据源相关 使用阿里巴巴的 druid 数据源,并配置多数据源 2....

  • centos安装oracle11.2.0.4.0

    1.配置本地yum源和epel源 2.oracle配置 oracle下载链接 配置主机名 配置JDK VNC配置 ...

  • Caffe安装 - RHEL 7.1

    配置yum源 具体还是配置本地yum源和163源,具体配置流程见Tensorflow安装篇 安装依赖包 下载caf...

  • Ubuntu 替换国内(阿里)安装源

    备份原来的数据源配置文件 编辑数据源配置文件 更新配置

网友评论

      本文标题:centos7yum源配置

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