分享

redhat5.2 x64上使用yum

 sys 2010-04-23
1、看看系统:
uname -a
Java代码 复制代码
  1. Linux hostname 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux   
  2. cat /etc/redhat-release    
  3. Red Hat Enterprise Linux Server release 5.2 (Tikanga)  


2、卸载掉自带的yum:
Java代码 复制代码
  1. rpm -aq|grep yum|xargs rpm -e --nodeps  


3、 下载centos的安装包
Java代码 复制代码
  1. wget http://ftp./centos/5/os/x86_64/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm   
  2. wget http://ftp./centos/5/os/x86_64/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm   
  3. wget http://ftp./centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm   
  4. wget http://ftp./centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm   
  5. wget http://ftp./centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm  
4、生成/etc/yum.repos.d/CentOS-Base.repo 文件,内容如下:

Java代码 复制代码
  1. [base]   
  2. name=CentOS-5 - Base   
  3. baseurl=http://ftp./centos/5/os/x86_64/   
  4. gpgcheck=1  
  5. gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5   
  6.   
  7. #released updates   
  8. [update]   
  9. name=CentOS-5 - Updates   
  10. baseurl=http://ftp./centos/5/updates/x86_64/   
  11. gpgcheck=1  
  12. gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5   
  13.   
  14. #packages used/produced in the build but not released   
  15. [addons]   
  16. name=CentOS-5 - Addons   
  17. baseurl=http://ftp./centos/5/addons/x86_64/   
  18. gpgcheck=1  
  19. gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5   
  20.   
  21. #additional packages that may be useful   
  22. [extras]   
  23. name=CentOS-5 - Extras   
  24. baseurl=http://ftp./centos/5/extras/x86_64/   
  25. gpgcheck=1  
  26. gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5   
  27.   
  28. #additional packages that extend functionality of existing packages   
  29. [centosplus]   
  30. name=CentOS-5 - Plus   
  31. baseurl=http://ftp./centos/5/centosplus/x86_64/   
  32. gpgcheck=1  
  33. enabled=0  
  34. gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5   
  35.   
  36. #contrib - packages by Centos Users   
  37. [contrib]   
  38. name=CentOS-5 - Contrib   
  39. baseurl=http://ftp./centos/5/contrib/x86_64/   
  40. gpgcheck=1  
  41. enabled=0  
  42. gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5  

5、换了一个Key
Java代码 复制代码
  1. rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5  

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多