CentOS Linux v6.5 has been released recently and it is available via repositories for immediate update. The new CentOS versions includes several hundred bug fixes for, and enhancements to the Linux kernel. If you would like to know how to Upgrade CentOS Linux v6.x to v6.5, then keep reading.
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.
Table of Contents
Back up any important data on the server/workstation
Make a backup of your system, don’t ever neglect to back up your system before doing such procedures as upgrading a current system.
You need to backup config files, user data stored in $HOME, mysql/pgsql/oracle and co databases, as well as web app files, or in short – Back up all your important 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.
Check your current CentOS release information
Type the following command to check the current version of your CentOS installation.
$ uname -mrs $ cat /etc/redhat-release
Show a list of available updates
To list all packages with updates available with the new release, enter the next commands:
# yum clean all # yum check-update
# yum clean all # yum check updates
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 command to upgrade:
# yum update
The packages which are going to be upgraded will now be displayed on the screen for the user confirmation, press ‘Y’ to confirm and continue with the upgrade process.
[root@geek-kb ~]# yum update Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile epel/metalink | 24 kB 00:00 * base: centos.syn.co.il * epel: mirror.switch.ch * extras: centos.syn.co.il * rpmforge: mirror1.hs-esslingen.de * updates: centos.syn.co.il base | 3.7 kB 00:00 base/primary_db | 4.4 MB 00:01 epel | 4.2 kB 00:00 epel/primary_db | 5.8 MB 00:01 extras | 3.4 kB 00:00 extras/primary_db | 19 kB 00:00 rpmforge | 1.9 kB 00:00 rpmforge/primary_db | 2.7 MB 00:01 updates | 3.4 kB 00:00 updates/primary_db | 1.3 MB 00:00 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package snappy.x86_64 0:1.1.0-1.el6 will be installed ---> Package xorg-x11-glamor.x86_64 0:0.5.0-6.20130401git81aadb8.el6 will be installed --> Processing Dependency: libEGL.so.1()(64bit) for package: xorg-x11-glamor-0.5.0-6.20130401git81aadb8.el6.x86_64 --> Running transaction check ---> Package mesa-libEGL.x86_64 0:9.2-0.5.el6_5.2 will be installed --> Processing Dependency: libgbm.so.1()(64bit) for package: mesa-libEGL-9.2-0.5.el6_5.2.x86_64 --> Running transaction check ---> Package mesa-libgbm.x86_64 0:9.2-0.5.el6_5.2 will be installed adobe-linux-x86_64/filelists | 606 B 00:00 base/filelists_db | 5.9 MB 00:01 epel/filelists_db | 8.0 MB 00:02 extras/filelists_db | 11 kB 00:00 rpmforge/filelists_db | 2.3 MB 00:01 updates/filelists_db | 982 kB 00:00 --> Finished Dependency Resolution Dependencies Resolved ===================================================================================== Package Arch Version Repository Size ===================================================================================== Installing: firefox x86_64 24.2.0-1.0.1.el6.centos updates 47 M replacing firefox.x86_64 17.0.10-1.el6.centos kernel x86_64 2.6.32-431.3.1.el6 updates 28 M Updating: ModemManager x86_64 0.4.0-5.git20100628.el6 base 177 k perl-HTML-Tree noarch 1:3.23-10.el6 base 203 k snappy x86_64 1.1.0-1.el6 base 39 k xorg-x11-glamor x86_64 0.5.0-6.20130401git81aadb8.el6 base 93 k Transaction Summary ===================================================================================== Install 12 Package(s) Upgrade 220 Package(s) Total download size: 315 M Is this ok [y/N]: y Downloading Packages: (1/232): ModemManager-0.4.0-5.git20100628.el6.x86_64.rpm | 177 kB 00:00 (231/232): xorg-x11-xinit-1.0.9-14.el6.x86_64.rpm | 43 kB 00:00 (232/232): yum-3.2.29-43.el6.centos.noarch.rpm | 996 kB 00:00 ------------------------------------------------------------------------------------- Total 3.3 MB/s | 315 MB 01:36 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : libgcc-4.4.7-4.el6.x86_64 1/453 Cleanup : glibc-2.12-1.107.el6_4.5.x86_64 451/453 Cleanup : tzdata-2013g-1.el6.noarch 452/453 Cleanup : libgcc-4.4.7-3.el6.x86_64 453/453 Verifying : pyparted-3.4-3.el6.x86_64 451/453 Verifying : spice-vdagent-0.12.0-4.el6_4.1.x86_64 452/453 Verifying : coreutils-libs-8.4-19.el6_4.2.x86_64 453/453 Installed: firefox.x86_64 0:24.2.0-1.0.1.el6.centos kernel.x86_64 0:2.6.32-431.3.1.el6 Dependency Installed: mesa-libEGL.x86_64 0:9.2-0.5.el6_5.2 xorg-x11-server-common.x86_64 0:1.13.0-23.1.el6.centos xorg-x11-xinit.x86_64 0:1.0.9-14.el6 yum.noarch 0:3.2.29-43.el6.centos Replaced: firefox.x86_64 0:17.0.10-1.el6.centos Complete! [root@geek-kb ~]#
(Command output has been truncated to fit on this page)
The next step would be to reboot the server, please run one of the following commands:
# shutdown -r now
[root@geek-kb ~]# reboot Broadcast message from root@geek-kb (/dev/pts/0) at 11:56 ... The system is going down for reboot NOW! [root@geek-kb ~]# Connection to geek-kb closed by remote host. Connection to geek-kb closed. itaig@itaig-lt:~$
Verification – After rebooting the machine:
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
In order to check that all the ports that are supposed to be opened are indeed open, run the next command:
# netstat -tulpn
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 'your_app'
See yum(8) command man page for more information.
I hope you like this article, please feel free to leave comments or ask questions.