1、rm -rf /etc/yum.conf
vi /etc/yum.conf
或者把以前/etc/yum.conf 里面的内容注释,加入以下内容。
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=0
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
2、cd /etc/yum.repos.d/
rm -rf rhel-debuginfo.repo
vi xxxx.repo
新建立一个xxxx.repo 的文件,xxxx可以随便启,只要以.repo结尾就行。
然后加入以下内容。
[base]
name=centos-5 - Base
baseurl=
# the other site:
# you can find more site in:
enabled=1
gpgcheck=1
gpgkey=RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-5 - Updates
baseurl=
gpgcheck=1
gpgkey=RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=
gpgcheck=1
gpgkey=RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=
gpgcheck=1
gpgkey=
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
baseurl=
gpgcheck=1
enabled=0
gpgkey=RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=
gpgcheck=1
enabled=0
gpgkey=RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=
gpgcheck=1
enabled=0
gpgkey=RPM-GPG-KEY-CentOS-5
这个是中科大的源,速度还很快。
有了网络yum安装起软件包比较方便。
测试下
yum -y install system-config-date
========================================================
阅读(1784) | 评论(0) | 转发(0) |