At some point in your Linux admin experience, you will run to a situation where you need to use YUM. YUM stands for The Yellow Dog Updater, Modified - YUM is an open-source (Free) Linux package management utility for Linux systems that use the RPM package manager. Yum makes it very simple to manage pancakes in your Linux distribution. Yum comes free already installed in many Linux distributions like Fedora. Yum is a command-line program.

I tried to install apt-get into my Red Hat server, but for some reason, yum was not installed automatically, so I had to install it manually. so the first thing I need to do is to make sure I have an internet connection and wget to do the following commands a root:

NOTE: If you have LInux Redhat Enterprise, You will NOT be able to install YUM without a License. So if you don't have one, you will need to buy one from Redhat. Otherwise, if you want to have YUM in your server, try an Open Source Distribution like Fedora.

1. Change to your root directory:

CODE:
cd ~

2. Make a directory called yum (you can call it whatever you want)
CODE:
mkdir yum

3. Change directory to the directory you just created (i used yum)
CODE:
cd yum

4. Download the yum version of your choice, I my case, I am downloading version 2.0.7 for my Red Hat Enterprise Edition Version 3
wget http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.7.tar.gz
UPDATE: As of December 2019, the Duke University Repository is no longer valid. Simply Google "yum-2.0.7.tar.gz" or whatever version you need to find a good repo.

5. Untar the package
CODE:
tar xvzf yum-2.0.7.tar.gz

6. Change directory to the directory you untar
CODE:
cd yum-2.0.7

7. Run the configuration file
CODE:
./configure

8. Make configuration
CODE:
make

9. Make installation
CODE:
make install

That's it - It worked for me, I hope it works for you!

NOTE: Before I could get this to work, I installed the latest, it turned out I was installing the wrong version for my python version, so make sure you are installing yum for the correct version: before, I kept getting this error whenever I tried the update command:
CODE:

> There was a problem importing one of the Python modules
> required to run yum. The error leading to this problem was:
>
>    /usr/lib/python2.4/site-packages/libxml2mod.so: undefined symbol:
> xmlSchemaIsValid
>
> Please install a package which provides this module, or
> verify that the module is installed correctly.
>
> It's possible that the above module doesn't match the
> current version of Python, which is:
> 2.4 (#1, Mar 22 2005, 21:42:42)
> [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)]
>
> If you cannot solve this problem yourself, please send this
> message to <yum at lists.linux.duke.edu>.
>


MAKE SURE TO DOWNLOAD THE CORRECT YUM VERSION:

* yum 3.0.1 - Stable Release, Python 2.4+ and rpm 4.3+ systems only. Requires respond repositories. Works under FC5, FC6 and rawhide.
* yum-metadata-parser 1.0.2 - C-based metadata parser to quickly parse xml metadata into sqlite databases.
* yum 2.6.X - Stable Release, Python 2.3+ and rpm 4.1.1+ systems requires respond repositories: 2.6.1 latest known to work with some FC3, FC4, FC5, RHEL4 and compatible distributions
* yum 2.4.X - Stable Release, Python 2.3+ and rpm 4.1.1+ systems requires respond repositories: 2.4.2 latest known to work with: FC3, FC4, RHEL4 and compatible distributions
* yum 2.0.X - for python 2.1+ and rpm 4.1.1-4.3.1 systems: 2.0.8 latest
* yum 1.0.X - for python 1.5.2+ and rpm 4.0.4 systems: 1.0.3 latest - considered obsolete

If you are not sure what version of python you have installed, send the following command to see your installed python version:

CODE:
python