Jean - 记录成长历程

  • 关于
  • Language
  • RSS Feed
  • 微博
  • 豆瓣
06
Aug

yum加速一条龙

By admin|Linux系统|7 Comments

[root@filerserver python]#cd /etc/yum.repos.d
[root@filerserver python]#mv CentOS-Base.repo CentOS-Base.repo.save
[root@filerserver python]#wget http://centos.ustc.edu.cn/CentOS-Base.repo.5
[root@filerserver python]#mv CentOS-Base.repo.5 CentOS-Base.repo

从dba blog看到的

懒人可以直接下载这个脚本执行以下,执行脚本需要root权限

#wget  http://www.zhangyiqun.cn/wp-content/uploads/2009/08/fastyum

当然如果是实验环境还可以选择使用本地光盘作为yum源

把光盘加载到本地

[root@localhost CentOS]# mount /dev/cdrom /media

在/etc/yum.repos.d/目录下,有两个文件

CentOS-Base.repo和CentOS-Media.repo

其中CentOS-Base.repo记录着网络上的yum源的地址和路径信息等

CentOS-Media.repo记录着可以从本地作为yum源的介质和路径。其中还有这样一个说明:

# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
# CentOS-5. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum –enablerepo=c5-media [command]
#
# or for ONLY the media repo, do this:
#
# yum –disablerepo=\* –enablerepo=c5-media [command]

[c5-media]
name=CentOS-$releasever – Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
file:///media/    #增加这句
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-beta

比如安装apache

[root@centos cdrom]# yum –disablerepo=* –enablerepo=c5-media install httpd

无觅相关文章插件,快速提升流量

Tagged as: 入门
Add your comment →

7 Comments

  1. http://dag.wieers.com/rpm/packages/rpmforge-release/?M=D

    rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm Fri 09 Mar 2007 16 kB Red Hat EL 5 – x86_64

    rpmforge-release RPM packages for Red Hat, CentOS and Fedora

    [回复]

    By: admin Author
    2009-10-12 at 10:44
  2. 我也用的这个

    [回复]

    admin 回复:
    08月 7th, 2009 at 14:43

    原来arch也是red hat系的,以为你用那个比较偏向diy

    [回复]

    ABitNo 回复:
    08月 10th, 2009 at 14:30

    什么跟什么啊。。。
    我也有个CentOS好吧。。。

    [回复]

    young001 回复:
    08月 8th, 2009 at 21:12

    arch用yum?你安装yum来管理软件?pacman我感觉还是不错的。。。

    [回复]

    ABitNo 回复:
    08月 10th, 2009 at 14:30

    我也有个CentOS。。。

    [回复]

    By: ABitNo
    2009-08-07 at 08:59

Pingbacks

  1. 10秒钟搭建本地yum服务器 | Jean - 记录成长历程

Leave your comment below! Cancel Reply

点击取消回复

View More Posts:
  • ←
  • →

分类

  • Linux系统 (61)
  • Linux集群 (4)
  • Web服务器 (26)
  • 创业相关 (6)
  • 工作笔记 (34)
  • 我爱折腾 (16)
  • 日记 (46)
  • 网络 (3)
  • 脚本编程 (49)

最新日志

  • 使用w3 total cache给wordpress提速
  • 从零开始,我的创业感悟
  • 为大众创造更美好的日常生活
  • 我的站立式工作平台
  • 阿里云计算使用简评

最新评论

  • admin on 从零开始,我的创业感悟
  • Kovlala on 从零开始,我的创业感悟
  • jean on 从零开始,我的创业感悟
  • Kovlala on 从零开始,我的创业感悟
  • ElmaByrd35 on 解决Fedora 11中文字体难看问题

博客互联

  • HackLog
  • leapsoul
  • Myredhat
  • Ninth element
  • Ti’blog
  • William Hua
  • young001
  • 懒人运维
  • 曙光博客
  • 月夜
  • 月影
  • 杂货店一号铺
  • 王先进’s blog
  • 疯中舞步
  • 菜鸟的技术站
  • 运维进行时

技术

  • DBA BLOG
  • 回忆未来[张宴]
  • 扶凯
  • 王炜's Blog
  • 百变贝贝

Powered by the inLine Minimal WordPress Theme