CentOS6.8配置阿里yum源

1.cd /etc/yum.repos.d/

进入yum源存放目录,默认会带有官方的yum源

2.rm -rf *

因为这些地址都是国外的源,下载时候速度会慢很多,删掉,下面给它替换成阿里的源

3.wget http://mirrors.aliyun.com/repo/Centos-6.repo

下载阿里的yum源

4.yum clean all

清空一下yum的缓存

5.yum repolist

查看yum源的列表并自动下载一些相应的元数据存到本地

6.yum -y install 软件名称

[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ll
total 24
-rw-r--r--. 1 root root 1991 May 19  2016 CentOS-Base.repo
-rw-r--r--. 1 root root  647 May 19  2016 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  289 May 19  2016 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 May 19  2016 CentOS-Media.repo
-rw-r--r--. 1 root root 6259 May 19  2016 CentOS-Vault.repo
[root@centos yum.repos.d]# rm -rf *
[[email protected] yum.repos.d]# ll
total 0
[root@centos yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-6.repo
--2020-03-22 15:30:38--  http://mirrors.aliyun.com/repo/Centos-6.repo
Resolving mirrors.aliyun.com... 218.98.31.243, 153.99.248.242, 218.98.31.244, ...
Connecting to mirrors.aliyun.com|218.98.31.243|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2523 (2.5K) [application/octet-stream]
Saving to: “Centos-6.repo”

100%[==============================================================================================================================>] 2,523       --.-K/s   in 0s      

2020-03-22 15:30:39 (336 MB/s) - “Centos-6.repo” saved [2523/2523]

[root@centos yum.repos.d]# ll
total 4
-rw-r--r--. 1 root root 2523 Jun 16  2018 Centos-6.repo
[root@centos yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos: base extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@centos yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                             | 3.7 kB     00:00
base/primary_db                                                                                                                                  | 4.7 MB     00:03
extras                                                                                                                                           | 3.4 kB     00:00
extras/primary_db                                                                                                                                |  29 kB     00:00
updates                                                                                                                                          | 3.4 kB     00:00
updates/primary_db                                                                                                                               | 8.9 MB     00:08
repo id                                                          repo name                                                                                        status
base                                                             CentOS-6 - Base - mirrors.aliyun.com                                                             6,713
extras                                                           CentOS-6 - Extras - mirrors.aliyun.com                                                              47
updates                                                          CentOS-6 - Updates - mirrors.aliyun.com                                                            935
repolist: 7,695

原文地址:https://www.cnblogs.com/ddstudy/p/12547103.html

时间: 2024-08-30 15:26:29

CentOS6.8配置阿里yum源的相关文章

CentOS6.5 配置本地Yum源

一.Yum简介 1.Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器. 2.基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载.安装. 3.本地Yum源的作用是你可以在不联网的情况下,就可以安装Linux需要的所有rpm包(可以理解为离线安装模式) 二.配置本地Yum源 1.右击虚拟机--进入"虚拟机设置&

centos6.5配置本地yum源

1.挂载系统安装光盘 # mount /dev/cdrom /mnt/cdrom/                 ##如果无/mnt/cdrom 手动创建即可,或者挂在到别的路径 2.配置本地yum源 # cd /etc/yum.repos.d/ # ls 会看到四个repo 文件 CentOS-Base.repo 是yum 网络源的配置文件 CentOS-Media.repo 是yum 本地源的配置文件 修改CentOS-Media.repo # cat CentOS-Media.repo

centos6.7配置本地yum源总结

建立ISO文件存放目录(/repo/iso)和ISO文件的挂载目录(/repo/centos)[r[email protected] yum.repos.d]# mkdir -p /repo/iso[[email protected] yum.repos.d]# mkdir -p /mnt/cdrom 建立光驱的挂载目录[[email protected] yum.repos.d]# mkdir -p /repo/centos 本地ISO的挂载目录 2.可以直接上传ISO文件或者挂载本地光盘!

CentOS-7配置阿里YUM源

配置阿里云YUM源:1,备份 #cd /etc/yum.repo.d/#mkdir repos#mv *.repo repos2,下载 #wget wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 3,#yum install -y epel-release.noarch 按装epel扩展源4,之后运行yum makecache生成缓存 原文地址:https://blog.

centos6系列更换阿里yum源

1.首先备份原来的cent os官方yum源 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 2.获取阿里的yum源覆盖本地官方yum源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 3.清理yum缓存,并生成新的缓存 yum clean all yum makecac

为centos7配置阿里yum源遇到的问题以及解决方法

[问题背景] 卸载安装的Ambari,之前都是因为卸载不干净.这次重写安装,卸载完之后,发现httpd无法启动,所以想卸载httpd进行重新安装,但是执行命令yum list | grep httpd报错. [遇到的问题] 配置过程很简单,去https://opsx.alibaba.com/mirror 获得执行命令: 但是我在执行yum makecache时报错,报错信息如下: Loaded plugins: fastestmirror, langpacks, priorities Repos

Centos6.4配置总结--配置本地yum源(Ⅲ)

用过苹果手机的手机党越狱之后都会装有一个Cydia,然后你想装某些软件可能需要叫你添加源.这里的源和我下面说的Linux的源有类似之处.就是在源对应的服务器上都会有很多软件,只要我们添加了正确的源,很多软件就可以自动从服务器下载安装了. 当然,我装Linux是为了研究系统,下面我就自己配置本地yum源.就是所有软件放在本地,我做好相应的配置之后,输入软件的名称就可以自动匹配安装.而网络上也有很多的源,比如163的开放源. 下面进入正题: 我下载的centos安装包有4G多,系统只是占了一小部分,

本地yum源 、阿里yum源、163yum源的配置安装

一.本地yum源 (我使用的7.3版本) 1..添加一个新的yum源配置文件dvd.repo(文件名字自定义) vi etc/yum.repos.d     添加新的内容: name=rhel_dvd                        baseurl=file://'/run/media/root/RHEL-7.3 Server.x86_64'(根据实际地址填写)                        enabled=1                        gpgc

CentOS6.5 搭建在线yum源

CentOS6.5 搭建在线yum源 发布时间:  2017-04-21 浏览次数:  611 下载次数:  1  问题描述 尽管有很多的免费镜像提供yum源服务,但是还是有必要建立自己的yum服务器,主要出于以下几点考虑: l 网络速度:访问互联网可能比较慢 l 节省带宽:如果有大量的服务器,架设自己的yum源可以有效节省互联网带宽 l 联网限制:对于有些内网服务器,不能连接到互联网  处理过程 安装Nginx服务器 1.获取Nginx安装包: wget http://tengine.taob