If you work with rpm-based systems you will probably have seen content like this in the repo config files:
name=CentOS-$releasever - Base
The items in bold are yum variables.
Today, I needed to install i386 packages on a system running an x86_64 kernel (don't ask!).
Here's how I did it:
echo i386 > /etc/yum/vars/basearch
Documentation here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-using_yum_variables
I had a utility server running RHEL 6.2 (I installed it as part of a RHEV evaluation process). However, I have no RHEL entitlements so am not able to get updates.
So, I converted it to CentOS 6.2, with a little help from this post:
yum clean all
rpm --import RPM-GPG-KEY-CentOS-6
rpm -e --nodeps redhat-release-server
rpm -e yum-rhn-plugin rhn-check rhnsd rhn-setup
rpm -Uhv --force *.rpm