Chinaunix首页 | 论坛 | 博客
  • 博客访问: 344829
  • 博文数量: 81
  • 博客积分: 95
  • 博客等级: 民兵
  • 技术积分: 450
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-18 20:40
文章分类

全部博文(81)

文章存档

2015年(25)

2014年(32)

2013年(2)

2012年(18)

2011年(4)

分类:

2012-08-13 08:14:09

原文地址:从头到尾配置yum 作者:blacksapper

开发机上的yum不能用.少了这个好东西装东西不是麻烦的要死.比如为了快速调试要安装eclipse for c++
这个东西要有openjdk的支持.也就是相当于要装java虚拟机.我就弄了一下yum
首先删除yum
然后到下载相应的包
python-iniparse-0.2.3-4.el5.noarch.rpm  yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
m2crypto-0.16-8.el5.i386.rpm  yum-3.2.22-39.el5.centos.noarch.rpm     yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
也可以这么干
解压缩后rpm -ivh *
安装相应的包
2. 导入系统自身的PGP key
rpm --import /usr/share/rhn/RPM-GPG-KEY


3.最后配置更新源
从网上的帖子来看无一例外是用wget
这样的方法来处理.可是咱的系统是红帽子的.用起来老是出问题.
后来发现问题出在
name=CentOS-$releasever - Base - 163.com
mirrorlist=
baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

$releasever里面.因为这里的更新源是centos的.所以红帽子用起来不是那么的顺.那就把所有的$releasesever换成里面一个可以用的数字就行了.
弄完运行yum makecache
就行了.剩下的yum update yum -y upgrade
最后安装openjdk
yum install *openjdk*
 
给一个我改后的repo文件

点击(此处)折叠或打开

  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client. You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #
  12. [base]
  13. name=CentOS-5 - Base - 163.com
  14. baseurl=
  15. #mirrorlist=
  16. gpgcheck=1
  17. gpgkey=
  18. #released updates
  19. [updates]
  20. name=CentOS-5 - Updates - 163.com
  21. baseurl=
  22. #mirrorlist=
  23. gpgcheck=1
  24. gpgkey=
  25. #packages used/produced in the build but not released
  26. [addons]
  27. name=CentOS-5 - Addons - 163.com
  28. baseurl=
  29. #mirrorlist=
  30. gpgcheck=1
  31. gpgkey=
  32. #additional packages that may be useful
  33. [extras]
  34. name=CentOS-5 - Extras - 163.com
  35. baseurl=
  36. #mirrorlist=
  37. gpgcheck=1
  38. gpgkey=
  39. #additional packages that extend functionality of existing packages
  40. [centosplus]
  41. name=CentOS-5 - Plus - 163.com
  42. baseurl=
  43. #mirrorlist=
  44. gpgcheck=1
  45. enabled=0
  46. gpgkey=
  47. #contrib - packages by Centos Users
  48. [contrib]
  49. name=CentOS-5 - Contrib - 163.com
  50. baseurl=
  51. #mirrorlist=
  52. gpgcheck=1
  53. enabled=0
  54. gpgkey=

阅读(897) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~