cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
installonlypkgs=kernel kernel-smp kernel-devel kernel-smp-devel kernel-largesmp kernel-largesmp-devel kernel-hugemem kernel-hugemem-devel
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1
plugins=1
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
cat /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
[base]
name=CentOS-4.6 - Base
baseurl=4.6/os/i386/
gpgcheck=1
#released updates
[update]
name=CentOS-4.6 - Updates
baseurl=4.6/updates/i386/
gpgcheck=1
#packages used/produced in the build but not released
[addons]
name=CentOS-4.6 - Addons
baseurl=4.6/addons/i386/
gpgcheck=1
#additional packages that may be useful
[extras]
name=CentOS-4.6 - Extras
baseurl=4.6/extras/i386/
gpgcheck=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4.6 - Plus
baseurl=4.6/centosplus/i386/
gpgcheck=1
enabled=0
#contrib - packages by Centos Users
[contrib]
name=CentOS-4.6 - Contrib
baseurl=4.6/contrib/i386/
gpgcheck=1
enabled=0
#packages in testing
[testing]
name=CentOS-4.6 - Testing
baseurl=4.6/testing/i386/
gpgcheck=1
enabled=0
rpm --import
对应不同的os版本更换你的配置,这是centos4的配置。
应用:
yum update -y
阅读(1132) | 评论(2) | 转发(0) |