Yum custom variables

While defining the your local yum repository you can use YUM’s in built and custom variable, most commonly used are

This is replaced with the package’s version, as listed in distroverpkg. This defaults to the version of the redhat-release package. ( this is defined in /etc/yum.conf)
e.g rpm -q –queryformat ‘%{VERSION}’ centos-release-5-9.el5.centos.1
This is replaced with your system’s architecture, as listed by os.uname() in Python.
This is replaced with your base architecture. For example, if $arch=i686 then $basearch=i386.
This is replaced with the value of the shell environment variable of the same name. If the shell environment variable does not exist, then the configuration file variable will not be replaced.
IF you are using Centos6 (rhel 6) you can define a custom variable or  override the value of an existing one, using file with the same name as the variable (without the $ sign) in the /etc/yum/vars/ directory, and add the desired value on its first line.


[root@myhost~]# cat /etc/yum/vars/releasever
Also have multilib_policy defined in your yum.conf to download the required architecure rpms only (32 bit /64 bit)