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. Python3.x:函数定义

    Python3.x:函数定义 1,函数定义: def 函数名称([参数1,参数2,参数3......]): 执行语句 2,实例一(不带参数和没返回值): def helloWorld(): print ...

  2. 使用ntpdate工具校正linux服务器时间

    当Linux服务器的时间不对的时候,可以使用ntpdate工具来校正时间. 安装:yum install ntpdate ntpdate简单用法: # ntpdate ip # ntpdate 210 ...

  3. Python内置函数(9)——callable--转载

    英文文档: callable(object) Return True if the object argument appears callable, False if not. If this re ...

  4. 安装 android x86 到 virtual box

    由于vmware无论怎么整,声音都出不了. 改用virtual box了. 很多注意点都参照了这篇文章 http://www.android-x86.org/documents/virtualboxh ...

  5. JSP 指令

    JSP 指令 JSP指令用来设置整个JSP页面相关的属性,如网页的编码方式和脚本语言. 语法格式如下: <%@ directive attribute="value" %&g ...

  6. Learn Rails5.2 Bundler ; Forms

    如果一个Rubyer想要提供一个功能或某个程序或程序的集合给其他Rubyer使用,这个Rubyer可以创建一个package,这个package就叫做gems. 可以通过gem install安装. ...

  7. linux下升级npm以及node

    npm升级 废话不多说,直接讲步骤.先从容易的开始,升级npm. npm这款包管理工具虽然一直被人们诟病,很多人都推荐使用yarn,但其使用人数还是不见减少,况且npm都是随node同时安装好的,一时 ...

  8. StringUtils工具类的isBlank()方法使用说明

  9. ExtJS 6 如何引入Dashboard模版

    最近很多人问我在ext js 6+的版本中怎么引入官方的dashboard模版,正好我好久没写博客了,这里我写一篇博客来说明一下. 在这里以ext js 6.2.1版本为例(注:需要安装Sencha ...

  10. Qt enum使用总结

    一.enum 自省 const QMetaObject &mo = [ClassName]::staticMetaObject; int index = mo.indexOfEnumerato ...