PHP 5.2.x & MySQL 5.0.x Upgrade for Plesk 8/9

Plesk generally runs a version or sub-version behind in their available PHP builds for Plesk. To safely upgrade PHP and MySQL on a production Plesk 8 or 9 server, please follow these instructions.

Step 1) Install the Atomic Channel:

$ wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh

Step 2) Upgrade PHP and MySQL:

$ yum upgrade php mysql

Step 3) Replace the PHP 4 php.ini with PHP 5.2.x’s (if applicable):

$ cp /etc/php.ini /etc/php.ini~backup

$ mv /etc/php.ini.rpmnew /etc/php.ini

Step 4) Replace the php.conf with the PHP 5.2.x php.conf (if applicable):

$ cp /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf~backup

$ mv /etc/httpd/conf.d/php.conf.rpmnew /etc/httpd/conf.d/php.conf

Step 5) Restart the webserver:

$ /etc/init.d/httpd restart

Step 6) Restart MySQL:

$ /etc/init.d/mysqld restart

Step 7) Test and confirm your PHP and MySQL versions via a phpinfo file.

Note: Please make sure to re-apply any security, optimization or memory management configuration to /etc/php.ini post upgrade.

3 Comments

  1. MarkF

    Tried this, it seems AtomiCorp no longer has any repo data?

  2. m

    Mark –

    Make sure your installing the repo as outlined (wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh), the Atomic Corp repo is live.

    Once you have the repo installed run: #yum check-update | grep atomic and you should see:

    [root@dev ~]# yum check-update | grep atomic
    * atomic: www4.atomicorp.com
    mysql.i386 5.0.86-1.el5.art atomic
    mysql-devel.i386 5.0.86-1.el5.art atomic
    mysql-server.i386 5.0.86-1.el5.art atomic
    nmap.i386 2:4.85-1.el5.art atomic
    php.i386 5.2.11-2.el5.art atomic
    php-cli.i386 5.2.11-2.el5.art atomic
    php-common.i386 5.2.11-2.el5.art atomic
    php-gd.i386 5.2.11-2.el5.art atomic
    php-imap.i386 5.2.11-2.el5.art atomic
    php-mbstring.i386 5.2.11-2.el5.art atomic
    php-mysql.i386 5.2.11-2.el5.art atomic
    php-pdo.i386 5.2.11-2.el5.art atomic
    php-pear.noarch 1:1.7.2-2.el5.art atomic
    php-xml.i386 5.2.11-2.el5.art atomic
    spamassassin.i386 1:3.2.5-1.el5.art atomic
    [root@dev ~]#

    m.

  3. Nizzy

    php.conf wasn’t created, but installation went through smoothly.

    [root@x6 ~]# cp /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf~backup
    [root@x6 ~]# mv /etc/httpd/conf.d/php.conf.rpmnew /etc/httpd/conf.d/php.conf
    mv: cannot stat `/etc/httpd/conf.d/php.conf.rpmnew’: No such file or directory

    also, better to mention these here too.

    [root@x6 ~]# wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh

    Atomic Archive installer, version 1.1
    Configuring the [atomic] yum archive for this system

    Installing the Atomic GPG key: OK
    Downloading atomic-release-1.0-10.el5.art.noarch.rpm: OK

    Would you like to add the Plesk yum repository to the system?

    Enable Plesk repository? (y/n) [Default: n]: y

    Plesk 8.6 and 9.2 repositories are available:
    NOTE: Plesk 9 repos are only available for rhel/centos 4 and 5

    Enable Plesk 8.6 or 9.2? (8/9) [Default: 8]: 9

Comments are closed