RHEL6 Beta: HowTo Use yum Command To Install Packages Without RHN
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 /myrepoThen, create a
.repofile in the/etc/yum.repos.d/directory that points to the local repository:$ echo " name=My Local Repositoryrnbaseurl=file:///myrepornenabled=1 gpgcheck=0" > /etc/yum.repos.d/myrepo.repoIn this example, the
.repofile 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 " name=My NFS Repositoryrnbaseurl=nfs://server.example.com/path/to/repornenabled=1 gpgcheck=0" > /etc/yum.repos.d/myrepo.repoIn this example, the
.repofile 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).
yum command to install packages from the repository, just as you would from the RHN. For example:$ yum install package_nameThis will install the package_name package from the repository specified in the .repo file.
