Patch and Update Redhat Enterprise Linux / CentOS 5 server

Q. Can you tell me how do I patch and update everything on my Redhat Enterprise Linux server 5?

ADVERTISEMENTS

A. Both RHEL 5 and CentOS 5 use yum command, which is an interactive, automated update program which can be used for maintaining systems using rpm.

To upgrade server and apply all security patches, pass update option to yum command. It will update every currently installed package. If one or more packages are specified, Yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied. If no package matches the given package name(s), they are assumed to be a shell glob and any matches are then installed.

Task: Redhat / CentOS upgrade server and apply all security patches

In short type the following command, as the root user:
# yum update
OR if sudo is configured:
$ sudo yum update
Sample output:

Loading "rhnplugin" plugin
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
rhel-x86_64-server-vt-5   100% |=========================| 1.2 kB    00:00     
rhel-x86_64-server-5      100% |=========================| 1.2 kB    00:00     
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package kernel-devel.x86_64 0:2.6.18-8.1.8.el5 set to be installed
---> Package kernel-headers.x86_64 0:2.6.18-8.1.8.el5 set to be updated
---> Package kernel.x86_64 0:2.6.18-8.1.8.el5 set to be installed
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package kernel-devel.x86_64 0:2.6.18-8.el5 set to be erased
---> Package kernel.x86_64 0:2.6.18-8.el5 set to be erased
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 kernel                  x86_64     2.6.18-8.1.8.el5  rhel-x86_64-server-5   14 M
 kernel-devel            x86_64     2.6.18-8.1.8.el5  rhel-x86_64-server-5  4.7 M
Updating:
 kernel-headers          x86_64     2.6.18-8.1.8.el5  rhel-x86_64-server-5  762 k
Removing:
 kernel                  x86_64     2.6.18-8.el5     installed          72 M
 kernel-devel            x86_64     2.6.18-8.el5     installed          15 M

Transaction Summary
=============================================================================
Install      2 Package(s)         
Update       1 Package(s)         
Remove       2 Package(s)         

Total download size: 20 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): kernel-devel-2.6.1 100% |=========================| 4.7 MB    00:04     
(2/3): kernel-headers-2.6 100% |=========================| 762 kB    00:00     
(3/3): kernel-2.6.18-8.1. 100% |=========================|  14 MB    00:12     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: kernel-devel                 ######################### [1/6] 
  Updating  : kernel-headers               ######################### [2/6] 
  Installing: kernel                       ######################### [3/6] 
  Cleanup   : kernel-headers               ######################### [4/6]
  Cleanup   : kernel-devel                 ######################### [5/6]
  Cleanup   : kernel                       ######################### [6/6]

Removed: kernel.x86_64 0:2.6.18-8.el5 kernel-devel.x86_64 0:2.6.18-8.el5
Installed: kernel.x86_64 0:2.6.18-8.1.8.el5 kernel-devel.x86_64 0:2.6.18-8.1.8.el5
Updated: kernel-headers.x86_64 0:2.6.18-8.1.8.el5
Complete!

A note for RHEL 4 user

You need to use up2date command:
# up2date -u

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
21 comments… add one
  • Jessica Mar 9, 2009 @ 6:24

    Does one need to reboot the machine after kernel update in Centos 5?

    I use “uname -a”, it shows the server is on latest kernel without rebooting.

    Does one need to change grub.conf?

    • 🐧 nixCraft Mar 9, 2009 @ 7:27

      You need to reboot the system after kernel upgrade no need to make any changes to grub.conf.

  • Jessica Mar 10, 2009 @ 9:07

    I rebooted. The server was able to start.

    Thank you so much.

  • PARAS Mar 24, 2009 @ 14:39

    sudo yum update doesnot work.
    [root@localhost ~]# sudo yum update
    Loading “list-data” plugin
    Loading “downloadonly” plugin
    Loading “basearchonly” plugin
    Loading “kmod” plugin
    Loading “priorities” plugin
    Loading “aliases” plugin
    Loading “refresh-updatesd” plugin
    Loading “allowdowngrade” plugin
    Loading “protect-packages” plugin
    Loading “changelog” plugin
    Loading “filter-data” plugin
    Loading “merge-conf” plugin
    Loading “protectbase” plugin
    Loading “tsflags” plugin
    Loading “security” plugin
    Loading “skip-broken” plugin
    Loading “kernel-module” plugin
    Loading “upgrade-helper” plugin
    Loading “fastestmirror” plugin
    Loading mirror speeds from cached hostfile
    * livna: mirrors.tummy.com
    * update: centosf.centos.org
    * base: centosf.centos.org
    * addons: centosq3.centos.org
    * extras: mirrors.kernel.org
    0 packages excluded due to repository priority protections
    Skipping filters plugin, no data
    0 packages excluded due to repository protections
    Skipping security plugin, no data
    Setting up Update Process
    No Packages marked for Update

    • 🐧 nixCraft Mar 24, 2009 @ 14:48

      You do not have any updates available. Please read the last line of your output.

  • laura Jun 1, 2009 @ 14:17

    Hiiiiiiiiiiiiiii
    Where can i download the Development tools for centos5?
    i need to install yum gcc……
    Thanks in advance!

  • Anil Jun 15, 2009 @ 19:15

    what option do I need to provide to go thru proxy server to run yum update?

    TIA

  • John Jun 18, 2009 @ 12:59

    Thanks for this. Worked perfectly!

  • Tim Hunt Jul 17, 2009 @ 4:54

    Is there a way of getting just security updates (say for CentOS 5.3) without upgrading to 5.4? In Ubuntu the difference would be between ‘upgrade’ and ‘dist-upgrade’.

    Thanks in advance,
    Tim.

  • Tim Jul 17, 2009 @ 6:13

    Many thanks… Hero points in the mail :)

  • mfijaz Aug 1, 2009 @ 5:00

    please upload the updates

  • mfijaz Aug 1, 2009 @ 5:03

    it is in /var/cache/yum/new-key updates

  • rohit Aug 27, 2011 @ 9:28

    hey there!
    i’m new to red hat. i have red hat linux 5 enterprise edition.
    how can i update and install the softwares in it for instance: if i wish to install vlc player
    how can it be done.

  • Arvind Yadav Jan 4, 2012 @ 4:06

    How to create patch management server in linux open source

  • MrMob09 Jan 5, 2012 @ 7:14

    When i use the Yum command to update the packages… it gives the following results..
    as i want to keep the system up 2 date from othere free repository.. Plz help me configre that thing plzzzzzzzzz
    Thankyou sir…
    [root@srvredhat5]# yum update
    Loading “rhnplugin” plugin
    Loading “installonlyn” plugin
    This system is not registered with RHN.
    RHN support will be disabled.
    Setting up Update Process
    Setting up repositories
    Reading repository metadata in from local files
    Resolving Dependencies
    –> Populating transaction set with selected packages. Please wait.
    —> Package rpmforge-release.i386 0:0.5.2-2.el5.rf set to be updated
    —> Package perl-Date-Manip.noarch 0:5.56-1.el5.rf set to be updated
    —> Package flash-plugin.i386 0:11.0.1.152-0.1.el5.rf set to be updated
    –> Running transaction check
    –> Processing Dependency: libnss3.so(NSS_3.12) for package: flash-plugin
    –> Processing Dependency: libnssutil3.so for package: flash-plugin
    –> Finished Dependency Resolution
    Error: Missing Dependency: libnss3.so(NSS_3.12) is needed by package flash-plugin
    Error: Missing Dependency: libnssutil3.so is needed by package flash-plugin

  • sairaj Jun 24, 2012 @ 7:53

    Hi all

    – How can i get all patches from redhat each time of available . I have already RHN account .

    – How can update 5.3 versions patches with out upgrade kernal version .

  • Les Nov 8, 2012 @ 19:38

    Hi all,
    I have a few questions for the floor….
    I have a RHE 5 server and I would like to know if i need to but support to update and patch it, or are they free, If they are free are they released some time after the latest release, so buying support would ensure you get the latest set instead of waiting for them for free?

    Many Thanks in advance

    • selva Aug 6, 2013 @ 11:57

      Hi,
      red hat linux security patches how to download and install in offline server RHEL 5.7 Server.Kindly help me .

      Regards
      Selva

  • satyabrata pani Feb 9, 2016 @ 7:36

    Hi,
    Anyone can help me ? Please give me some knowledge about Patch installation and upgrade on production machine.

    Thanks:
    Satya

  • Moon Feb 9, 2017 @ 4:19

    Hi All,
    I need to submit the report of last patches to my manager. Can anyone help me? how to recover the last patching details from the server.

    Your help would be highly appreciated.
    Regards
    Moon

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.