Centos 修改yum源为aliyun

修改服务器源,避免长途跋涉到国外:

位置:

vim  /etc/yum.repos.d/CentOS-Base.repo

aliyun地址:

设置aliyun的yum源

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

添加epl源:

装上 EPEL后,可以像在 Fedora 上一样,可以通过 yum install package-name,安装更多软件。

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

清理缓存,生成新的yum以及epl缓存:

4.清理缓存并生成新的缓存

yum clean all
yum makecache

yum   update

原文地址:https://www.cnblogs.com/SunshineKimi/p/12299899.html

时间: 2024-08-01 16:45:24

Centos 修改yum源为aliyun的相关文章

CentOS修改yum源为阿里云

yum的工具,自动去下载某个yum仓库的 rpm软件包,并且自动搜索软件下载软件依赖,如同pip3,npm等包管理工具 yum载linux中的 yum仓库是 /etc/yum.repos.d 并且在这个目录,只有以 .repo的文件结尾,才会识别为是一个yum仓库 自定义yum仓库,修改yum源 为什么要修改? 1.yum默认配置的是centos的国外仓库地址,下载比较慢,修改为阿里云的yum仓库,加速下载 配置阿里云yum源的步骤 1.备份旧的yum源 cd /etc/yum.repos.d/

一键修改 yum 源为 aliyun 阿里源 Shell 脚本

CentOS安装后默认官方源,速度可能不是很快,这个时候就需要更改为国内的源了, 这里以 阿里源 为例,进行脚本展示 #!/bin/bash # by liuxg # 2019.05.15 # aliyun_repo.sh # 获得当前 CentOS 系统发行版本号 # 第一个 awk 后边必须换行, 目前未查到原因 releasetmp=`cat /etc/redhat-release | awk '{match($0,"release ") print substr($0,RSTA

修改yum源为aliyun

linux系统使用CentOS6.5 1.备份原有的源     mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的CentOS-Base.repo 到/etc/yum.repos.d/这个目录下     CentOS 5     wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Cen

CentOS 修改yum 源

CentOS 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的CentOS-Base.repo 到/etc/yum.repos.d/ CentOS 5 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo CentOS 6 wget -O /etc/

Centos修改yum源并安装docker

首先备份/etc/yum.repos.d/CentOS-Base.repo 下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份) CentOS5 CentOS6 运行yum makecache生成缓存 eple源: rpm -Uvh http://ftp.sjtu.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm docker 安装: You will need RHEL 6.5 or higher,

[转]CentOS 修改yum源为国内源

http://blog.csdn.net/pkueecser/article/details/8836973 重要:存放路径  cd /etc/yum.repos.d 首先备份CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 法一:直接下载源文件 CentOS USTC mirror 这个镜像不错,大家更新可用这个 #yum -y install wget

Centos修改yum源为163

1.首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载163repo文件(地址根据centos版本而定) wget http://mirrors.163.com/.help/CentOS6-Base-163.repo 3.刷新缓存 yum clean all yum makecache 参考: http://

修改CentOS默认yum源为国内yum镜像源

修改CentOS默认yum源为mirrors.163.com 1.首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.进入yum源配置文件所在的文件夹 cd /etc/yum.repos.d/ 3.下载163的yum源配置文件到上面那个文件夹内 CentOS7 wget http://mir

CentOS修改yum更新源

1. 在修改前先备份该文件 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 2. 修改更新源配置文件(CentOS6地址,其他版本类似) vim打开配置文件: vim /etc/yum.repos.d/CentOS-Base.repo 复制以下内容粘贴到配置文件中进行: # CentOS-Base.repo # # The mirror system uses the connecting IP