Yum updates using Versaweb's mirror - yum.conf

source: http://www.versaweb.net/forums/showthread.php?p=484#post484

#################

[main]
exclude=mod_ssl* httpd* perl mysql* php* spamassassin*
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
installonlypkgs=kernel kernel-smp kernel-hugemem kernel-enterprise kernel-debug kernel-unsupported kernel-smp-unsupported kernel-hugemem-unsupported
tolerant=1
exactarch=1

[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.versaweb.net/cAos/centos/$releasever/os/$basearch/
http://acmserver.cs.ucr.edu/centos/centos/$releasever/os/$basearch/
http://mirror.centos.org/centos-3/$releasever/os/$basearch/
failovermethod=priority
gpgcheck=1

#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.versaweb.net/cAos/centos/$releasever/updates/$basearch/
http://acmserver.cs.ucr.edu/centos/centos/$releasever/updates/$basearch/
http://mirror.centos.org/centos-3/$releasever/updates/$basearch/
failovermethod=priority
gpgcheck=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirrors.versaweb.net/cAos/centos/$releasever/addons/$basearch/
http://acmserver.cs.ucr.edu/centos/centos/$releasever/addons/$basearch/
http://mirror.centos.org/centos-3/$releasever/addons/$basearch/
failovermethod=priority
gpgcheck=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.versaweb.net/cAos/centos/$releasever/extras/$basearch/
http://acmserver.cs.ucr.edu/centos/centos/$releasever/extras/$basearch/
http://mirror.centos.org/centos-3/$releasever/extras/$basearch/
failovermethod=priority
gpgcheck=1

#packages in testing
#[testing]
#name=CentOS-$releasever - Testing
#baseurl=http://mirror.centos.org/centos-3/$releasever/testing/$basearch/
#gpgcheck=1

#################

You also need to make sure you import the GPG key so that your RPM installs won't fail - you can do this by issuing the following command at the shell prompt:

Code:

rpm --import http://mirrors.versaweb.net/cAos/centos/RPM-GPG-KEY-CentOS-3

If you would like to install this yum.conf file and aren't sure how to do it, just run the following commands from your SSH window after adding the GPG key above and you will be getting your updates from our CentOS mirror. You can even copy / paste the commands if needed:

Code:

cd /etc
mv yum.conf yum.conf.original
wget http://www.versaweb.net/scripts/general/yum.conf
chmod 644 yum.conf

after you have installed the new yum.conf file, run a 'yum update' and you should be all set! All of our new servers will come with this yum.conf file installed by default, so this won't be necessary.

Please note that this configuration is set up to work with cpanel/directadmin/plesk control panels - if you want to run updates on apache, mod_ssl, perl, or several other commonly installed programs, you will need to modify the exclude list above accordingly.