博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
让 CentOS 使用 yum
阅读量:6705 次
发布时间:2019-06-25

本文共 2597 字,大约阅读时间需要 8 分钟。

  hot3.png

  1. 下载安装 yum

Download CentOS6.3 yum i386: wget wget wget wget

x86_64: wget wget wget wget

Install CentOS6.3 yum i386: rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm rpm -ivh yum-metadata-parser-1.1.2-16.el6.i686.rpm rpm -ivh yum-3.2.29-30.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm (Must install both at the same time.)

x86_64: rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm rpm -ivh yum-3.2.29-30.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

  1. 配置 新建 /etc/yum.repos.d/CentOS5-Base.repo 一个文件,内容如下:
# 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.##  file: /etc/yum.repos.d/CentOS5-Base.repo#  yum clean all#  yum makecache#[base]name=CentOS-5.10 - Basemirrorlist=http://mirrorlist.centos.org/?release=5.10&arch=x86_64&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#released updates [updates]name=CentOS-5.10 - Updatesmirrorlist=http://mirrorlist.centos.org/?release=5.10&arch=x86_64&repo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#packages used/produced in the build but not released[addons]name=CentOS-5.10 - Addonsmirrorlist=http://mirrorlist.centos.org/?release=5.10&arch=x86_64&repo=addonsgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#additional packages that may be useful[extras]name=CentOS-5.10 - Extrasmirrorlist=http://mirrorlist.centos.org/?release=5.10&arch=x86_64&repo=extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#additional packages that extend functionality of existing packages[centosplus]name=CentOS-5.10 - Plusmirrorlist=http://mirrorlist.centos.org/?release=5.10&arch=x86_64&repo=centosplusgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5#contrib - packages by Centos Users[contrib]name=CentOS-5.10 - Contribmirrorlist=http://mirrorlist.centos.org/?release=5.10&arch=x86_64&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

其中 版本为 : 5.10, arch 为 x86_64, 请自己修改相应的版本号

我们看到, 对应下面的mirror列表

  1. 然后运行下面的目录,更新 yum repo
# yum clean all# yum make clean
  1. 然后就可以使用 yum 了
# yum search xxx# yum install xxx

转载于:https://my.oschina.net/sub/blog/312169

你可能感兴趣的文章
php Collection类的设计
查看>>
c++中的计时器代码
查看>>
语义Web和本体开发相关技术
查看>>
Mysql集群读写分离(Amoeba)
查看>>
Quest for sane signals in Qt - step 1 (hand coding a Q_OBJECT)
查看>>
SpringBoot的注解:@SpringBootApplication注解 vs @EnableAutoConfiguration+@ComponentScan+@Configuration...
查看>>
SQL Server性能调优之执行计划深度剖析 第一节 浅析SQL执行的过程
查看>>
利用自定义IHttpModule来实现URL地址重写
查看>>
在网页上嵌入 PowerPoint 演示文稿
查看>>
javascript日期格式化函数,跟C#中的使用方法类似
查看>>
Android杂谈--Activity、Window、View的关系
查看>>
使用delphi 开发多层应用(十)安全访问服务器
查看>>
JavaScript计算字符串中每个字符出现的次数
查看>>
mvc中的ViewData用到webfrom中去
查看>>
小白学数据分析------>描述性统计术语汇总
查看>>
[转载]java.lang.OutOfMemoryError: bitmap size exceeds VM budget解决方法
查看>>
SKY IM-A800S 驱动下载
查看>>
应用程序 数据缓存
查看>>
TFS签入签出
查看>>
第二条:遇到多个构造器参数(Constructor Parameters)时要考虑用构建器(Builder)
查看>>