≡ Menu

HowTo: Upgrade CentOS Linux 6.4/6.3/6.2/6.1/6.0 to v6.5

CentOS Linux v6.5 has been released and available via repos for immediate update. The new version includes several hundred bug fixes for, and enhancements to the Linux kernel. How do I upgrade from CentOS Linux version 6.0 / 6.1 / 6.2 / 6.3 or 6.4 to the latest version 6.5?

You can only upgrade from minor release as CentOS does not support in-place upgrades between any major versions of CentOS Linux. However, a minor upgrade can be done easily and recommended for all users.

Back up any important data on the server/workstation

Make a backup – it cannot be stressed enough how important it is to make a backup of your system before you do this. You need to backup config files, user data stored in $HOME, pgsql/msyql/oracle and co databases, and web apps files. In short, backup all the data. Most of the actions listed in this post are written with the assumption that they will be executed by the root user running the bash or any other modern shell.

See your current CentOS release information

Type the following commands to see current version:
$ uname -mrs
$ cat /etc/redhat-release

Sample outputs:

CentOS release 6.4 (Final)

Show list of available updates

To list all packages with updates available with new release, enter:
# yum clean all
# yum check-update

# yum clean all
# yum list updates

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.mirrors.tds.net
 * extras: lug.mtu.edu
 * updates: yum.singlehop.com
Updated Packages
abrt.x86_64                            2.0.8-21.el6.centos               base
abrt-addon-ccpp.x86_64                 2.0.8-21.el6.centos               base
abrt-addon-kerneloops.x86_64           2.0.8-21.el6.centos               base
abrt-addon-python.x86_64               2.0.8-21.el6.centos               base
abrt-cli.x86_64                        2.0.8-21.el6.centos               base
sysvinit-tools.x86_64                  2.87-5.dsf.el6                    base
udev.x86_64                            147-2.51.el6                      base
util-linux-ng.x86_64                   2.17.2-12.14.el6                  base
xmlrpc-c.x86_64                        1.16.24-1210.1840.el6             base
xmlrpc-c-client.x86_64                 1.16.24-1210.1840.el6             base
xorg-x11-drv-ati-firmware.noarch       7.1.0-3.el6                       base

Note: Upgrade speed depends upon various factors such as the current system load, upstream rpm fetch server bandwidth and your Internet connection speed.

CentOS Linux: Upgrading your current system

Type the following yum command to upgrade:
# yum clean all
Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
Cleaning repos: base extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors

To update, enter:
# yum update
Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
Determining fastest mirrors
 * base: mirrors.einstein.yu.edu
 * extras: mirrors.loosefoot.com
 * updates: yum.singlehop.com
base                                                     | 3.7 kB     00:00
base/primary_db                                          | 4.4 MB     00:01
extras                                                   | 3.4 kB     00:00
extras/primary_db                                        |  18 kB     00:00
updates                                                  | 3.4 kB     00:00
updates/primary_db                                       |  26 kB     00:00
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package abrt.x86_64 0:2.0.8-16.el6.centos.1 will be updated
---> Package abrt.x86_64 0:2.0.8-21.el6.centos will be an update
---> Package abrt-addon-ccpp.x86_64 0:2.0.8-16.el6.centos.1 will be updated
---> Package abrt-addon-ccpp.x86_64 0:2.0.8-21.el6.centos will be an updateInstalling for dependencies:
 lzo                             x86_64 2.03-3.1.el6              base     55 k
 make                            x86_64 1:3.81-20.el6             base    389 k
 p11-kit                         x86_64 0.18.5-2.el6              base     94 k
 p11-kit-trust                   x86_64 0.18.5-2.el6              base     71 k
 shared-mime-info                x86_64 0.70-4.el6                base    209 k
 snappy                          x86_64 1.1.0-1.el6               base     39 k
Transaction Summary
Install       7 Package(s)
Upgrade     128 Package(s)
Total download size: 122 M
Is this ok [y/N]:  y
Downloading Packages:
(1/135): abrt-2.0.8-21.el6.centos.x86_64.rpm             | 208 kB     00:00
(2/135): abrt-addon-ccpp-2.0.8-21.el6.centos.x86_64.rpm  | 116 kB     00:00
(3/135): abrt-addon-kerneloops-2.0.8-21.el6.centos.x86_6 |  65 kB     00:00
(4/135): abrt-addon-python-2.0.8-21.el6.centos.x86_64.rp |  65 kB     00:00
(5/135): abrt-cli-2.0.8-21.el6.centos.x86_64.rpm         |  54 kB     00:00
  Updating   : openssh-clients-5.3p1-94.el6.x86_64                      107/263
  Updating   : openssh-server-5.3p1-94.el6.x86_64                       108/263
warning: /etc/ssh/sshd_config created as /etc/ssh/sshd_config.rpmnew
  Updating   : parted-2.1-21.el6.x86_64                                 109/263
  Updating   : biosdevname-0.5.0-2.el6.x86_64                           110/263
  Updating   : libdrm-2.4.45-2.el6.x86_64                               111/263
  Verifying  : lvm2-2.02.98-9.el6_4.3.x86_64                            262/263
  Verifying  : efibootmgr-0.5.4-10.el6.x86_64                           263/263
  kernel.x86_64 0:2.6.32-431.el6
Dependency Installed:
  lzo.x86_64 0:2.03-3.1.el6               make.x86_64 1:3.81-20.el6
  p11-kit.x86_64 0:0.18.5-2.el6           p11-kit-trust.x86_64 0:0.18.5-2.el6
  shared-mime-info.x86_64 0:0.70-4.el6    snappy.x86_64 0:1.1.0-1.el6
  abrt.x86_64 0:2.0.8-21.el6.centos
  abrt-addon-ccpp.x86_64 0:2.0.8-21.el6.centos
  systemtap-runtime.x86_64 0:2.3-3.el6
  sysvinit-tools.x86_64 0:2.87-5.dsf.el6
  udev.x86_64 0:147-2.51.el6
  util-linux-ng.x86_64 0:2.17.2-12.14.el6
  xmlrpc-c.x86_64 0:1.16.24-1210.1840.el6
  xmlrpc-c-client.x86_64 0:1.16.24-1210.1840.el6
  xorg-x11-drv-ati-firmware.noarch 0:7.1.0-3.el6

(Command output truncated to fit on this page)

Reboot the Linux server using any one of the following method:
# reboot
# shutdown -r now
Sample outputs:

Broadcast message from vivek@db1
	(/dev/pts/0) at 2:20 ...
The system is going down for reboot NOW!
[root@db1 vivek]# Connection to 173.xxx.yyy.zzz closed by remote host.
Connection to 173.xxx.yyy.zz closed.

Verification: After rebooting the box

Verify that everything is working fine and you have been upgraded to the latest CentOS Linux v6.5 release with the following commands:
# uname -a
# cat /etc/redhat-release

Sample outputs:

Fig.01: CentOS Linux 6.5 Final

Fig.01: CentOS Linux 6.5 Final

Verify open ports and make sure your apps are running without any problems with the following commands:
# netstat -tulpn
# tail -f /var/log/messages
# tail -f /path/to/log/files
# ps aux | less
# ps aux | egrep 'httpd|mysql'
# pgrep 'my_app'

See yum(8) command man page for more information.

Share this tutorial on:
{ 9 comments… add one }
  • dr December 2, 2013, 9:37 am

    thanks for the article! that should be “yum check-update”, rather than “yum check-updates”

    • nixCraft December 2, 2013, 9:52 am

      Thanks for the heads up. I appreciate your post.

  • Vasily Bezruchkin December 4, 2013, 4:18 pm

    Thanks for the instructions. One small issue, CentOS 6.5 does not have /etc/redhat_release file. Use cat /etc/redhat-release instead. Everything else worked fine so far!

    • Nix Craft December 4, 2013, 5:33 pm

      It was a typo on my part. The faq has been updated. I appreciate your post.

  • Muhammad Adnan December 7, 2013, 12:22 pm

    in Centos it is cat/system-release

    I hope it helps.

  • Muhammad Adnan December 7, 2013, 12:23 pm

    Correction in my previous msg.

    cat /etc/system-release

  • tantn January 20, 2014, 6:46 am

    after upgrade, package php has change, What is the difference php on 6.3 and 6.5?
    mysite is problems??
    php-cli-5.3.3-14.el6_3.x86_64 => php-cli-5.3.3-27.el6_5.x86_64

  • Matthew Sweet February 3, 2014, 10:19 pm

    What if my lab custer is running 6.3 and I just want to go to 6.4 but not 6.5 due to custom software support limitations? Is there a way to do that? Current i’m blocking exclude=centos-release*

    • sugatang itlog February 5, 2014, 1:23 pm

      Hi, create your own repositories that has the 6.4 rpms or use any repo centos. Then point your Centos .repo machine to it. Hope this helps.

Leave a Comment

   Tagged with: ,