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. 2017-2018-1 Java小组-1623 第二周作业

    2017-2018-1 Java小组-1623 第二周作业 关于游戏软件的问题 讨论结果 20162301张师瑜 20162305李昱兴 20162306陈是奇 20162308马平川 2016231 ...

  2. 20162314 Experiment 4 - Graph

    Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...

  3. CentOS7.2 安装nginx-1.10.3

    nginx-1.10.3 下载nginx 检查是否安装了依赖库: [root@localhost ~]# rpm -q gcc gcc-4.8.5-11.el7.x86_64 [root@localh ...

  4. IDEA使用Git管理项目

    今天将项目使用Git管理了,IDEA. 第一步: 第二步:

  5. C++ 自定义错误类

    #include <iostream> #include <exception> using namespace std; struct MyException : publi ...

  6. UVa 10054 项链(欧拉回路)

    https://vjudge.net/problem/UVA-10054 题意:有一种由彩色珠子连接成的项链.每个珠子的两半由不同颜色组成.相邻两个珠子在接触的地方颜色相同.现在有一些零碎的珠子,需要 ...

  7. 动态规划-Stock Problem

    2018-04-19 19:28:21 股票问题是leetcode里一条非常经典的题目,因为其具有一定的现实意义,所以还是在数学建模方面还是有很多用武之地的.这里会对stock的给出一个比较通用的解法 ...

  8. PHP------数组和对象相互转化,stdClass Object转array

    数组转JSON PHP json_encode() 用于对变量进行 JSON 编码,该函数如果执行成功返回 JSON 数据,否则返回 FALSE . JSON转数组 PHP json_decode() ...

  9. Html中的表格

    表格由<table>标签来定义.每个表格均有若干行(由<tr> 标签定义),每行被分割为若干单元格(由<td>标签定义). 字母 td 指表格数据(table da ...

  10. 我的octopress配置

    在github上用octopress搭建了自己的blog,octopress号称是"专门给黑客打造的博客(A blogging framework for 把hackers)",使 ...