CentOS 6.5 has been released and brings many new features and security fixes.

In my case, I needed to upgrade from CentOS 6.4 to CentOS 6.5 because I needed php-5.4.24 (provided by remi repository), which required openssl-1.0.1 , introduced in CentOS 6.5 and unavailable in CentOS 6.4.

This HowTO explains how to upgrade to CentOS 6.5 on GoDaddy VPS (virtual private server, also called virtual dedicated server).

WARNING1: GoDaddy support discourage in doing this kind of update (and they even don’t know how to do it), because they want you to use their repositories. It is not clear if further updates will break things up. So follow this guide at your own risk.

WARNING2: BACKUP EVERYTHING, a system update like this one could overwrite important configuration files (e.g: php.ini, my.cnf, httpd.conf, etc) or could even completely break your system. I updated 5 GoDaddy servers without any problem, but I don’t know what will happen with yours.

WARNING3: MAKE A FULL COPY OF YOUR SERVER, because if something goes wrong, system could become unbootable. If you miss one or more steps, YOUR SERVER WON’T BOOT. If you have a custom server configuration, YOUR SERVER MAY NOT BOOT AFTER THE UPGRADE and you will HAVE TO reprovision your server, which means losing ALL DATA on server disk.

Why do I need to update to CentOS 6.5?

As soon as php-5.4.24 package (by remi) has been released, yum update started to raise weird errors.

These are the errors when I issued “yum update”, trying to update from php-5.4.23 to php-5.4.24 on CentOS 6.4.

On GoDaddy VPS, issuing the command “yum update” doesn’t update to CentOS 6.5, because GoDaddy uses its own repositories, very outdated, slow and often unreachable.

1. Edit CentOS Base Repository

You must tweak some configuration files:

# vim /etc/yum.repos.d/CentOS-Base.repo

You need to change GoDaddy mirrorlist to default CentOS one and you’ll get the default repo file.

This is my CentOS-Base.repo after the changes:

# CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.##[base]name=CentOS-$releasever – Base#mirrorlist=http://n1plmirror01.shr.prod.ams1.secureserver.net/vph/2/download/mirrors/cos-$releasever-os.$basearchmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#released updates

[updates]name=CentOS-$releasever – Updates#mirrorlist=http://n1plmirror01.shr.prod.ams1.secureserver.net/vph/2/download/mirrors/cos-$releasever-updates.$basearchmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#additional packages that may be useful