CentOS 7 更换 阿里云/清华大学 yum 软件源

阿里云参考:https://opsx.alibaba.com/mirror?lang=zh-CN

清华参考:https://mirrors.tuna.tsinghua.edu.cn/help/centos/

阿里云:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

清华:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
vi /etc/yum.repos.d/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 makecache

原文地址:https://www.cnblogs.com/wswind/p/10173591.html

时间: 2024-08-05 04:54:54

CentOS 7 更换 阿里云/清华大学 yum 软件源的相关文章

为 Virtual Box 中的 CentOS 6.6 配置本地DVD光盘做yum软件源

因为virtual box 中的centos配置host-only共享win7上网,配置失败,所以只能使用Centos的 DVD 光盘来配置yum软件源.不然就没得完了. 1. 首先要在virtual box 中的插入DVD的iso光盘,相信这一步,大家都会,不然如何在virtual box 安装centos呢? 2. 挂载 iso 光盘第一步之后,我们发现执行 df 命令,尽然没有看到我们上面挂载的 iso 光盘,这是怎么回事呢? [root[email protected] ~]# df F

CentOS 7 使用 Yum 软件源安装谷歌 Chrome 浏览器

Google Chrome是一款由 Google 公司开发的网页浏览器,新版的 Chrome 浏览器使用的是 Blink 内核,具有运行速度快,稳定的特性.Chrome 能够运行在 Windows,Linux,Mac 桌面系统中,同时也能运行在手机和平板上的iOS,Android系统上,是一款跨平台的浏览器. 本文章介绍在 CentOS 7 系统上使用谷歌 Yum 软件源安装 Chrome 浏览器,谷歌的官方软件源在中国可用,使用谷歌 Yum 软件源能够保证安装的 Chrome 浏览器是最新版本

本地Yum软件源安装Cloudera Manager 5

本地Yum软件源安装Cloudera Manager 5 (非原创,转自http://blog.csdn.net/yangzhaohui168/article/details/30118175) Cloudera Manager 5(以下简称CM)默认采用在线安装的方式,给不能联互联网或者网络不畅的用户带来了不便,由于网络问题,屡装屡败的挫折感,让初次学习CDH用户真心体验到万事开头难.本文讲解了在CentOS 6环境下搭建本地Yum软件源,局域网内的用户在完全不连互联网的情况下,完成CM的安装

更改yum源为阿里云的yum源

更改centos6的yum源为阿里云的yum源 方法: 1.进入到/etc/yum.repos.d/目录下,备份之前的CentOS-Base.repo地址. cd /etc/yum.repos.d/ mv CentOS-Base.repo CentOS-Base.repo.bak 2.下载阿里云yum源 centos6:wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo centot5:wget -O Cen

redhat7配置阿里云的yum源并安装httpd服务  

1.配置yum源 [base] name=CentOS-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/ gpgcheck=1 enabled=1 gpgkey=http://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7 2.更新yum源 y

更改yum网易 阿里云的yum源。

一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/CentOS-Base.repomv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)http://mirrors.1

CemtOS7更改yum网易 阿里云的yum源。

一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份) http://mirror

CentOS7用阿里云Docker Yum源在线安装Docker

一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq.aliyun.com/articles/110806 二.安装步骤1.删除已安装的Docker # Uninstall installed docker sudo yum remove docker docker-client docker-client-latest docker-common d

安装Ubuntu服务器版 + 远程连接ssh +更换阿里云源

安装Ubuntu服务器版 1.点击 “开启此虚拟机”,开始安装. 2.默认选择English,英文版安装,直接按Enter键即可. 3.默认选择“Install Ubuntu Server”,安装ubuntu服务器版. 4.继续默认项“English” 5.国家或地区我们选择  “Other”--> "Asia" --> "China" 6.继续默认项 7.是否检测键盘布局,我们选择“No” 8.键盘布局所属国家:English  :键盘布局:Engli