Friday 10 June 2011

Install and update software packages from Red Hat Network, a remote repository, or from the local filesystem

Let's start backwards with this one:

Install and update software packages from the local filesystem:
rpm -ivh mypackage.rpm
rpm -Uvh mypackage.rpm
Install and update software packages from a remote repository:

First let's configure the remote repository. You'll need to create a file with .repo extension on your /etc/yum.repos.d/ directory. A sample such is below. Note that the directory /distro is actually a mounted NFS share.
[nfs]
name=nfs
baseurl=file:///distro/
enabled=1
The baseurl field can be an http://, ftp:// or file:// URL.
It's useful to know how to import the gpg key of repository, this can be done with the following command
rpm --import gpgkey
Now you are ready to use yum, which handles dependencies as well and thus is really useful, in their simpler forms, the command are very similar to rpm.
yum install package
yum upgrade package
Install and update software packages from Red Hat Network:

This is identical to the objective above, except that you need to configure (register?) your server with RHN. You'll need to register to see the client configuration guide

No comments:

Post a Comment