On Red Hat Enterprise Linux (RHEL) 6 Beta, you can use the yum
command to install packages without using the Red Hat Network (RHN) by configuring yum to use a local repository or a repository on a network file system (NFS). Here’s how you can do this:
- Create a local repository: If you have the packages on your local machine, you can create a local repository by creating a directory to hold the packages, and copying the packages into that directory. For example:
mkdir /myrepo
cp /path/to/packages/*.rpm /myrepo
Then, create a
.repo
file in the/etc/yum.repos.d/
directory that points to the local repository:$ echo "[myrepo]
name=My Local Repository
baseurl=file:///myrepo
enabled=1
gpgcheck=0" > /etc/yum.repos.d/myrepo.repo
In this example, the
.repo
file specifies the name of the repository (My Local Repository
), the URL of the repository (file:///myrepo
), that the repository is enabled (enabled=1
), and that GPG signature checking is disabled (gpgcheck=0
). - Use a network file system (NFS) repository: If you have access to an NFS-mounted directory that contains the packages, you can use that directory as a yum repository. For example:
$ echo "[myrepo]
name=My NFS Repository
baseurl=nfs://server.example.com/path/to/repo
enabled=1
gpgcheck=0" > /etc/yum.repos.d/myrepo.repo
In this example, the
.repo
file specifies the name of the repository (My NFS Repository
), the URL of the repository (nfs://server.example.com/path/to/repo
), that the repository is enabled (enabled=1
), and that GPG signature checking is disabled (gpgcheck=0
).
After creating the repository, you can use the yum
command to install packages from the repository, just as you would from the RHN. For example:
$ yum install package_name
This will install the package_name
package from the repository specified in the .repo
file.