Centos 更改yum源

Centos 的yum源的配置路径,主要是在/etc/yum.repos.d/CentOS-Base.repo 的文件,在进行更改的时候,要注意先安装wget ,本案例中,使用的是阿里云的yum源,详情文档可以参考:

https://yq.aliyun.com/articles/33286

步骤如下:

  1. 先安装wget 工具,为下面下载阿里云的yum源的配置文件做准备

  2. 备份Yum 源的源文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

  3.下载阿里云的Yum 的CentOS-Base.repo的文件,命令为:

    

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

  4. 修改新的源文件的配置文件:enabled = 0

  5.  yum clean all : 清除缓存目录下的软件包及旧的headers

  6. yum makecache :是 将服务器上的软件包信息 现在本地缓存,以提高 搜索 安装软件的速度

  至此:yum的源更改为阿里云成功;

原文地址:https://www.cnblogs.com/bing-yu12/p/8318482.html

时间: 2024-08-10 17:26:51

Centos 更改yum源的相关文章

CentOS更改yum源与更新系统

[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] 进入yum源配置文件所在文件夹 [[email protected] yum.repos.d]# cd /etc/yum.repos.d/ [3] 下载163的yum源配置文件,放入/etc/yum.repos.d/(操作前请做好相应备份) [[ema

CentOS更改yum源

[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] 进入yum源配置文件所在文件夹 [[email protected] yum.repos.d]# cd /etc/yum.repos.d/ [3] 下载163的yum源配置文件,放入/etc/yum.repos.d/ [[email protected

CentOS更改yum源与系统更新(转)

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.进入yum源配置文件所在文件夹 # cd /etc/yum.repos.d/ 3.下载163的yum源配置文件,放入/etc/yum.repos.d/(操作前请做好相应备份) # wget http://mirrors.163.com/.help/CentO

更改yum源及pip源

CentOS更改yum源为阿里 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 或者 curl -o /e

在CentOS 7下更改yum源与更新系统

在CentOS 7下更改yum源与更新系统. [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo cp /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源配置文件,放入/etc/yum.repos.d/(操作前请做好相应备份) wget http://mir

CentOS 7更改yum源与更新系统

在CentOS 7下更改yum源与更新系统. [1] 首先备份/etc/yum.repos.d/CentOS-Base.repo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup [2] 进入yum源配置文件所在文件夹 [[email protected] yum.repos.d]# cd /etc/yum.repos.d/ [3] 下载163的yum源配置文件,放入/etc/yum.rep

Redhalt配置Centos的yum源 详细步骤

  大家都应该都清楚,redhalt 刚装完系统之后的yum是不好使的,有时我们像安装vsftp 这样的软件时用yum安装很方便.为此我们需要利用centos的yum源进行配置.现在这个源更新速度很快. 这是网易的资源总库http://mirror.centos.org/.里面应有尽有.废话不多说: 具体安装步骤: 1.删除redhat原有的yum源 # rpm -aq | grep yum|xargs rpm -e –nodeps 2.重新从网上获取yum的安装包  以root登陆到redha

RHEL6.5系统更换Centos系统YUM源

##引言##:由于RHEL的yum在线更新是收费的,如果没有注册的话是不能使用的,即不能在线安装软件.那么要想用yum在线安装软件我们可以使用centos的yum源,具体办法见下面内容. 一.删除RHEL原有的yum [[email protected] ~]# rpm -aq|grep yum|xargs rpm -e --nodeps    ##删除 二.下载centos的yum安装包 [[email protected] ~]# wget http://vault.centos.org/6

redhat配置centos网络yum源

方案一: 配置网络yum源rpm -ivh vsftpd-2.2.2-6.el6_0.1.x86_64service vsftpd restartchkconfig --level 35 vsftpd oncd /var/ftp/pub/mkdir yum把上面的挂载点改成/var/ftp/pub/yumvim /etc/yum.repos.d/rhel-source.repo[server]name=serverbaserul=ftp://pub/yum/Server/  #(注意要挂载光驱)