centos下yum 安装eclipse,mplayer
习惯了eclipse开发工具,习惯了用mplayer听音乐,但是二者在CentOS下,用yum竟然不能安装,提示找不到安装包,这让我很是不爽,在网上搜集了一些信息,尝试了几次都装上了。
一,安装 yum-priorities
yum install yum-priorities 安装完后,看一下enabled是不是1
[zhangy@localhost download]$ cat /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
二,修改/etc/yum.repos.d/CentOS-Base.repo
[zhangy@localhost download]$ cd /etc/yum.repos.d
[zhangy@localhost yum.repos.d]$ cp ./CentOS-Base.repo ./CentOS-Base.repo1119_bak
做好备份后
vi ./CentOS-Base.repo
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5.5/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1
在gpgkey的下面加上priority属性
在[base], [addons], [updates], [extras] 加上 priority=1
[centosplus],[contrib] 加上 priority=2
加上priority的目的,就是标识一下优先级
三,下载rpmforge-release并安装
下载地址:http://packages.sw.be/rpmforge-release/
如果你的电脑是32位的,就选择i386
如果你的电脑是64位的,就选择x86_64
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
[root@localhost download]# rpm -ivh /home/zhangy/download/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
四,检查更新,并安装eclipse,mplayer
yum check-update
yum install mplayer*
yum install eclipse*