souhu  yum服务器CentOS-Base.repo

将$releasever替换为操作系统版本号

# 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 - sohu.com
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #released updates
[updates]
name=CentOS-$releasever - Updates - sohu.com
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.sohu.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons - sohu.com
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirrors.sohu.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - sohu.com
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.sohu.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - sohu.com
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.sohu.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - sohu.com
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirrors.sohu.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
复制代码
放入/etc/yum.repos.d/ 运行yum makecache生成缓存 清华的5.2单独定义的:
CentOS 5.2 清华大学 YUM源 CentOS-Base.repo
  # CentOS-Base.repo
  #
  # This file uses a new mirrorlist system developed by Lance Davis for CentOS.
  # 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-5 - Base
  repo=os
  baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/5.2/os/$basearch/
  gpgcheck=1
  gpgkey=ftp://ftp3.tsinghua.edu.cn/mirror/centos/RPM-GPG-KEY-CentOS-5
  
  [update]
  name=CentOS-5 - Updates
  baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/5.2/updates/$basearch/
  gpgcheck=1
  gpgkey=ftp://ftp3.tsinghua.edu.cn/mirror/centos/RPM-GPG-KEY-CentOS-5
  
  [addons]
  name=CentOS-5 - Addons
  baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/5.2/addons/$basearch/
  gpgcheck=1
  gpgkey=ftp://ftp3.tsinghua.edu.cn/mirror/centos/RPM-GPG-KEY-CentOS-5
  
  [extras]
  name=CentOS-5 - Extras
  baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/5.2/extras/$basearch/
  gpgcheck=1
  gpgkey=ftp://ftp3.tsinghua.edu.cn/mirror/centos/RPM-GPG-KEY-CentOS-5
  
  [centosplus]
  name=CentOS-5 - Plus
  baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/5.2/centosplus/$basearch/
  gpgcheck=1
  enabled=0
  gpgkey=ftp://ftp3.tsinghua.edu.cn/mirror/centos/RPM-GPG-KEY-CentOS-5
  
  [contrib]
  name=CentOS-5 - Contrib
  baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/centos/5.2/contrib/$basearch/
  gpgcheck=1
  enabled=0
  gpgkey=ftp://ftp3.tsinghua.edu.cn/mirror/centos/RPM-GPG-KEY-CentOS-5

  

然后执行 要用rpm --import ftp://ftp3.tsinghua.edu.cn/mirror/centos/5.0/os/i386/RPM-GPG-KEY-CentOS-5导入,这个文件http://mirrors.sohu.com/centos/6/os/x86_64/也可以下载

http://bbs.chinaunix.net/thread-2288939-1-1.html

CenOS中的yum配置文件CentOS-Base.repo里面的参数都是何含义? souhu CentOS-Base.repo的更多相关文章

  1. centos yum源配置 与yum配置文件

    参考博客 http://www.cnblogs.com/mchina/archive/2013/01/04/2842275.html 1.centos . yum配置文件在目录 /etc/yum.re ...

  2. 在CentOS中使用 yum 安装MongoDB及服务器端配置

    转自 http://blog.csdn.net/zhangfeng19880710/article/details/20166853 一.准备工作: 运行yum命令查看MongoDB的包信息 [roo ...

  3. 最简单实用的MongoDB安装教程:在CentOS中使用 yum 安装MongoDB及服务器端配置详解

    一.准备工作: 运行yum命令查看MongoDB的包信息 [root@vm ~]# yum info mongo-10gen (提示没有相关匹配的信息,) 说明你的centos系统中的yum源不包含M ...

  4. CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory

    今天尝试更新了下虚拟机CentOS中的python版本后. 运行“yum”命令,就报错:“sudo: unable to execute /bin/yum: No such file or direc ...

  5. 在centos中修改yum源为阿里源

    cd /etc/yum.repos.d 备份旧的配置文件:mv CentOS-Base.repo CentOS-Base.repo.bak 下载阿里源的文件: wget -O CentOS-Base. ...

  6. linux centos中使用yum安装tomcat

    在linux下部署java开发的web应用,一般采用Tomact+jre环境(可不需要apache),在RHEL和CentOS下,可以采用yum在线自动安装方式安装,具体操作如下: 可以先查看tomc ...

  7. Linux中的yum的配置以及常见报错的处理

    一. 今天登录服务器的时候,误把yum所在的cache文件夹中的文件删除掉了,导致yum不能够使用,解决的方法: 显示错误如下: Loaded plugins: fastestmirror Deter ...

  8. linux中配置yum源

    1.配置163或者阿里云yum源: 阿里云yum源地址:https://mirrors.aliyun.com/centos/6.9/os/x86_64/Packages/ 阿里云给出的解决办法:htt ...

  9. 【在下版本,有何贵干?】Dockerfile中 RUN yum -y install vim失败Cannot prepare internal mirrorlist: No URLs in mirrorlist

    隐秘的版本问题---- Dockerfile中 RUN yum -y install vim失败Cannot prepare internal mirrorlist: No URLs in mirro ...

随机推荐

  1. SQL学习笔记四(补充-2)之MySQL多表查询

    阅读目录 一 介绍 二 多表连接查询 三 符合条件连接查询 四 子查询 五 综合练习 一 介绍 本节主题 多表连接查询 复合条件连接查询 子查询 准备表 #建表 create table depart ...

  2. hdu 6301 Distinct Values(贪心)题解

    题意:长为n的串,给你m个区间,这些区间内元素不重复,问这样的串字典序最小为? 思路:用set保存当前能插入的元素,这样就能直接插入最小元素了.对操作按l排序,因为排过的不用排,所以两个指针L,R是一 ...

  3. 谈谈java中对象的深拷贝与浅拷贝

    知识点:java中关于Object.clone方法,对象的深拷贝与浅拷贝 引言: 在一些场景中,我们需要获取到一个对象的拷贝,这时候就可以用java中的Object.clone方法进行对象的复制,得到 ...

  4. SpringBoot使用Redis数据库

    (1)pom.xml文件引入jar包,如下: <dependency> <groupId>org.springframework.boot</groupId> &l ...

  5. [转]Python的getattr(),setattr(),delattr(),hasattr()

    getattr()函数是Python自省的核心函数,具体使用大体如下: 获取对象引用getattrGetattr用于返回一个对象属性,或者方法 class A: def __init__(self): ...

  6. Factory Method(工厂方法)

    Factory Method(工厂方法) 意图: 定义一个用于创建对象的接口,让子类决定实例化哪一个类.Factory Method 使一个类的实例化延迟到其子类. 适用性: 当一个类不知道它所必须创 ...

  7. redis事务和脚本

    事务,简单理解就是,一组动作,要么全部执行,要么就全部不执行.从而避免出现数据不一致的情况. redis提供了简单的事务功能,将一组需要的命令放到multi和exec两个命令之间.multi代表事务开 ...

  8. Java Spring-JdbcTemplate

    2017-11-10 22:55:45 Spring 对持久层技术支持 : JDBC : org.springframework.jdbc.core.JdbcTemplate Hibernate3.0 ...

  9. JAVA异常处理分析高级进界(下)

    既然Throwable是异常处理机制的核心,那么,我们就来分析下它的源码来看看它是如何实现的. 进行分析前,我们可以先想想如果让我们实现一个异常处理机制,我们需要它做什么? 1. 发生异常终止程序执行 ...

  10. BooStrap4文档摘录 Utilities

    border:可以用原生css实现效果.❌没看 clearfix, float,  ✅ close icon ✅ colors ✅ display✅  各种显示的格式. embed ✅ <ifr ...