How to update Linux with Yum

Updating RedHat & CentOS with Yum

If you are using RedHat & its clones like CentOS or CloudLinux etc. you can use Yum or up2date to upgrade your current system.

Please note that is you have a RedHat Enterprise Linux Subscription we offer you to use the command up2date, to upgrade your server with yum write the command from shell:

yum upgrade

If it asks for the keys, you can press “Y” to accept the keys and continue to install the upgrades, to install an application or library with yum type:

yum install packagename

If you don’t know the package name containing the application you want to use, you can use the list function of yum.

For example to list packages related to dig similiar to Windows nslookup type the following command:

yum list dig*

Yum will find the packages names starting with dig, this function is so useful when finding apache modules (mod-*) and php modules (php-*) but this time it will return with an error as it cannot find any related packages names starting with dig*:

#Error: No matching Packages to list

Because some applications reside in a set of packages in Linux distros. Here comes the “whatprovides” in stage. If you used the command in Linux before but you don’t know the package containing the command you can find it easily with yum:

yum whatprovides */dig

and the output of yum is:

#30:bind-utils-9.3.6-4.P1.el5_4.2.x86_64 : Utilities for querying DNS name servers.
#Repo : base
#Matched from:
#Filename : /usr/bin/dig

Yum tell us the package we were searching for is bind-utils. When you install bind-utils you will have a bunch of useful utulities related to named. After this step the only thing you need to do is:

yum install bind-utils

and yum will install the package with all prerequisities.

IMPORTANT NOTE: This document is prepared for CentOS 5.6 and ment to work with other versions and distros.Never assume the directory structures exist in your system as written in the document. Never blindly follow security instructions — read, review, compare, apply as it fits your system.

  • 9 Users Found This Useful
Was this answer helpful?

Related Articles

Setting time with NTP in LINUX

NTP (Network Time Protocol) could be used to set time synced with ntp clocks, to do this use the...

Linux version & Operating System info

LINUX Version Info To learn the architecture and kernel version info use the shell command...

Build PHP5.5 on CentOS 6.4 with MSSQL Support [cite]

Most of the yum repos doesn’t include PHP5.5.X on current releases for the time being. So...

Change Outgoing IP of Postfix Mail Server

This can get quite important when your mail server is blacklisted, or if you somehow want to...

Add New Hosting to a System Installed With Plugged.sh

If you use our LAMP installer script and want to add a new domain afterwards, we’ve created...