If you believe my posts will help someone please feel free to share.

Making sure you install the correct version with yum

This has happened to me more than once so I thought I’d jot it down. Many times when you read tutorials on how to install different software packages on Linux you will simply see

sudo yum install package_name

However this may not install the version of the software you actually intended.

For example, say you want to install Apache httpd server.

A tutorial will say

sudo yum install httpd

Apache at the time of this writing is Apache 2.4 and running the above common on my Amazon instance would actually install Apache 2.1.

So here are some steps to walk through to make sure you install what you think you are installing when using a package manager.

1) See if the software package is installed and if it is the version you intend to install.

you list all installed software packages with

yum list intalled

but why not narrow it down if you know the package name. Use wildcard for good measure in case there are multiple version out there.

yum list httpd*

2) If it is not listed, then you need to install it but check to see what version would be installed.

For example,

sudo yum install httpd will install Apache HTTP Server 2.2

3) Install the version you want

First we need to see what versions are available in our repositories.

There we are the Apache HTTP version we want, 2.4.