开发机上的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文件
- # 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-5 - Base - 163.com
- baseurl=
- #mirrorlist=
- gpgcheck=1
- gpgkey=
- #released updates
- [updates]
- name=CentOS-5 - Updates - 163.com
- baseurl=
- #mirrorlist=
- gpgcheck=1
- gpgkey=
- #packages used/produced in the build but not released
- [addons]
- name=CentOS-5 - Addons - 163.com
- baseurl=
- #mirrorlist=
- gpgcheck=1
- gpgkey=
- #additional packages that may be useful
- [extras]
- name=CentOS-5 - Extras - 163.com
- baseurl=
- #mirrorlist=
- gpgcheck=1
- gpgkey=
- #additional packages that extend functionality of existing packages
- [centosplus]
- name=CentOS-5 - Plus - 163.com
- baseurl=
- #mirrorlist=
- gpgcheck=1
- enabled=0
- gpgkey=
- #contrib - packages by Centos Users
- [contrib]
- name=CentOS-5 - Contrib - 163.com
- baseurl=
- #mirrorlist=
- gpgcheck=1
- enabled=0
- gpgkey=
阅读(705) | 评论(0) | 转发(0) |