In general, just using yum is not sufficient for package compatibility. The rpm package format is relatively flexible, in the sense that it doesn't impose much by way of policy. The R package you want to use could be packaged such that they're distribution agnostic and just need to be unpacked via yum. However, it is more likely that they follow a whole host of assumptions about the distribution beyond yum itself — what libraries are available, what they're named, where they put their files (and what rpm packages those things come from).
In that case, you'll be best off with Red Hat Enterprise Linux itself, or with CentOS or Scientific Linux (both of which are built from the source packages provided by Red Hat). You may also be able to use Fedora, which is a community-built distribution in the same "family" (and generally much more desktop focused and bleeding edge).
Yum maintains a cache of the RPMs it downloads here:
/var/cache/yum/<you architecture>/<OS version>/
For example my box is Fedora 14, x86_64 architecture so I have the following:
$ ls /var/cache/yum/x86_64/14/
adobe-linux-i386 lamolabs rpmfusion-nonfree
adobe-linux-x86_64 lamolabs-noarch rpmfusion-nonfree-debuginfo
Dropbox nautilus-flickr-uploader rpmfusion-nonfree-rawhide-debuginfo
fedora qm rpmfusion-nonfree-source
...
...
But the RPMs that get installed are basically like a zip or tar file. So the contents of these files get dumped into the system and RPM maintains a database of what packages it has installed. The RPM "database" is located in this directory:
$ ls /var/lib/rpm
Basenames __db.002 Dirnames Installtid Packages Pubkeys Sha1header
Conflictname __db.003 Filedigests Name Providename Requirename Sigmd5
__db.001 __db.004 Group Obsoletename Provideversion Requireversion Triggername
You can see where files get installed per each RPM with these commands.
what files are in an installed RPM
$ rpm -ql rpm
/bin/rpm
/etc/rpm
/usr/bin/rpm2cpio
/usr/bin/rpmdb
/usr/bin/rpmquery
/usr/bin/rpmsign
/usr/bin/rpmverify
/usr/lib/rpm
/usr/lib/rpm/macros
/usr/lib/rpm/platform
/usr/lib/rpm/platform/amd64-linux
...
...
package info about a given RPM
$ rpm -qi rpm
Name : rpm Relocations: (not relocatable)
Version : 4.8.1 Vendor: Fedora Project
Release : 7.fc14 Build Date: Tue 04 Oct 2011 03:49:08 AM EDT
Install Date: Tue 25 Oct 2011 09:36:34 AM EDT Build Host: x86-05.phx2.fedoraproject.org
Group : System Environment/Base Source RPM: rpm-4.8.1-7.fc14.src.rpm
Size : 2035701 License: GPLv2+
Signature : RSA/SHA256, Tue 04 Oct 2011 12:14:48 PM EDT, Key ID 421caddb97a1071f
Packager : Fedora Project
URL : http://www.rpm.org/
Summary : The RPM package management system
Description :
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages. Each software
package consists of an archive of files along with information about
the package like its version, a description, etc.
Best Answer
This information comes from a blog post I wrote some time ago.
First, create a Virtual Machine and do a fresh install of the same RHEL version on it. Make sure you perform a minimal installation so that the packages installed on the machine are kept to the minimum required for the machine to run.
Then, run the following commands on the machine:
Yum will download Foobar and all its dependencies recursively, storing the RPMs in the directory mentioned above.
Create a repository from the bunch of packages downloaded by Yum.
Transfer the
tmppkg
directory on the server (via USB thumb drive or CD-ROM) and put it in the/share
directory. Then create a file/etc/yum.repos.d/local.repo
as such:Now you can install the Foobar package on the server in the usual way. The package manager will fetch all the necessary content from the newly created local repository:
Once you’ve installed the package, the
/share/tmppkg
directory can be safely deleted.