Dotster VPS Upgrade to PHP 5 and MySQL 5

// May 7th, 2007 // Technology Bits

I recently purchased a Dotster VPS and needed to get it upgraded to have PHP 5 and MySQL 5, rather than version 4 of both. These machines run CentOS, so the best plan was to use yum.

Unfortunately, yum is not installed initially, so the first step was to get and install all the prerequisites plus yum:


export MIRROR=http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/
wget ${MIRROR}python-sqlite-1.1.7-1.2.i386.rpm
wget ${MIRROR}sqlite-3.3.3-1.2.i386.rpm
wget ${MIRROR}python-urlgrabber-2.9.8-2.noarch.rpm
wget ${MIRROR}python-elementtree-1.2.6-4.2.1.i386.rpm
wget ${MIRROR}yum-2.4.3-1.c4.noarch.rpm rpm -Uhv python-elementtree-1.2.6-4.2.1.i386.rpm
rpm -Uhv python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uhv sqlite-3.3.3-1.2.i386.rpm
rpm -Uhv python-sqlite-1.1.7-1.2.i386.rpm
rpm -Uvh yum-2.4.3-1.c4.noarch.rpm

Once that is in place, you need to enable CentOS Plus. Go into /etc/yum.repos.d/CentOS-Base.repo and under [centosplus] change “enabled=0″ to “enabled=1″.

Now you can simply execute ‘yum update’ and it should install both MySQL 5 and PHP 5 with all the necessary prerequisites (plus a number of other things…)

Update: A few other things to do:


  • Remove /etc/php.d/ioncube-loader.ini This file will cause weirdness with PHP and throw “Failed loading /usr/lib/php4/php_ioncube_loader_lin_4.3.so: /usr/lib/php4/php_ioncube_loader_lin_4.3.so: undefined symbol: zend_hash_add_or_update” in /var/log/httpd/error_log

  • Change php.ini memory_limit to be increased from the default of 8M, I recommend at least 32MB

  • Tune your MaxClients setting in /etc/httpd/conf/httpd.conf I couldn’t begin to make a recommendation here…

Do this at your own risk, this could mess up your entire system. Be sure to have a good backup before starting this process.

cent os, centos, centos plus, centosplus, dotster, dotster vps, mysql, mysql 5, php, php 5, unix, vps, yum

10 Responses to “Dotster VPS Upgrade to PHP 5 and MySQL 5”

  1. [...] care because I want Apache 2.2.4, and while it’s pretty easy to get MySQL & PHP 5 on a CentOS/Plesk box, Apache 2.2 is a bit more of a [...]

  2. Tom Wilson says:

    Hey, thanks a bunch for this little helper post. I just upgraded to a VPS and had php4 and mysql4, so this helped speed up the transition process 10 fold. Thanks again.

  3. Kevin says:

    One word – LIFESAVER! I’m in the process of transferring several of my sites to a new VPS with a new company, which only offers CentOS as the OS…which is fine, but I’m used to FC6. I wasn’t sure if I could just upgrade software without screwing up Plesk or what (not used to having a control panel to get in my way)

    Really helpful.

  4. Avi says:

    WOW!

    I was pretty worried, but it was just smooth and easy. :)

    THANKS!

  5. John Doyle says:

    had two centos 4.4 boxes this worked a charm.
    Had to recompile suexec but only took a few mins.
    Many thanks

  6. Cliff says:

    It is worth mentioning that you should upgrade your MySQL databases as well, so that you can take advantage of some of the zoomy new features in 5.

    mysql_upgrade -u admin –password=XXXXXXXX

  7. michael says:

    You can get the ioncube loader message to go away by downloading the free ioncube loaders from this page

    http://www.ioncube.com/loaders.php

    the reason it is complaining is that now it only has the old loaders for php 4.3.

    since you have just upgraded to php5 you only need to upload the ioncube php5 loaders to get rid of that message.

    to do that do something like
    wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

    make sure you go to ioncube and select the package that is right for your system. the random link above is the tar file for the linux x86-64 server

    then just copy the ioncube loader into the same directory that the complaints are coming from. in the case above it’s
    /usr/lib/php4/php_ioncube_loader_lin_4.3.so

    so you need to copy
    /usr/lib/php4/php_ioncube_loader_lin_5.0.so
    into the same directory then the ioncube loaders can be activated.

  8. Mahmoud says:

    I followed exactly step by step your kindly provided recommendations, but yummy on my CentOS4.6 machine only upgraded the centos kernel on yum update. sql is still 4

  9. Dimi says:

    Good help thanks,
    I’ve upgrade my PHP to v 5 without any issue
    but i have an error in the beginning of this upgrade for Mysql and now i should take some help from friends.

    Regards
    Dimi

  10. Thank you so much for this information. It saved me a ton of time and frustration.

    Even 3 years after the date of the article it still mostly works. For anyone trying this you’ll find that some of the versions have changed and there’s one more file needed.

    I’ve listed new commands below. These worked for me on 5/19/2010:

    export MIRROR=http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/
    wget ${MIRROR}python-sqlite-1.1.7-1.2.1.i386.rpm
    wget ${MIRROR}sqlite-3.3.6-2.i386.rpm
    wget ${MIRROR}python-urlgrabber-2.9.8-2.noarch.rpm
    wget ${MIRROR}python-elementtree-1.2.6-5.el4.centos.i386.rpm
    wget ${MIRROR}yum-metadata-parser-1.0-8.el4.centos.i386.rpm
    wget ${MIRROR}yum-2.4.3-4.el4.centos.noarch.rpm

    rpm -Uhv python-elementtree-1.2.6-5.el4.centos.i386.rpm
    rpm -Uhv python-urlgrabber-2.9.8-2.noarch.rpm
    rpm -Uhv sqlite-3.3.6-2.i386.rpm
    rpm -Uhv python-sqlite-1.1.7-1.2.1.i386.rpm
    rpm -Uhv yum-metadata-parser-1.0-8.el4.centos.i386.rpm
    rpm -Uvh yum-2.4.3-4.el4.centos.noarch.rpm

    Rather than typing them each individually you’re better off putting then all into a shell file running that once.

    Finally, the ‘yum update’ didn’t fully work for me. I need to run ‘yum update php’ and ‘yum update mysql’ to get both to update.

    Hope this helps. Good Luck!

Leave a Reply

PHVsPjxsaT48c3Ryb25nPndvb19hYm91dDwvc3Ryb25nPiAtIENvbWljIGJvb2sgZ3V5LCB0ZWNoIGdlZWssIGFuZCBmYXRoZXIgb2YgdHdvLi4uPC9saT48bGk+PHN0cm9uZz53b29fYWJvdXRsaW5rPC9zdHJvbmc+IC0gIzwvbGk+PGxpPjxzdHJvbmc+d29vX2Fkc19yb3RhdGU8L3N0cm9uZz4gLSB0cnVlPC9saT48bGk+PHN0cm9uZz53b29fYWRfaW1hZ2VfMTwvc3Ryb25nPiAtIGh0dHA6Ly93d3cud29vdGhlbWVzLmNvbS9hZHMvd29vdGhlbWVzLTEyNXgxMjUtMS5naWY8L2xpPjxsaT48c3Ryb25nPndvb19hZF9pbWFnZV8yPC9zdHJvbmc+IC0gaHR0cDovL3d3dy53b290a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