Hello Everyone,
I have searched far and near for a simple solution for CentOS and RedHat to install or update php and its binaries to the latest 5.3.2 and ioncube. So I decided to make a guide for it here in just a few simple steps.
Installing or Upgrading PHP 5.3.2
1) SSH into your box as root
2) Ensure your in your /root directory.
3) Lets add the Webtatic repo to YUM
Code:
rpm -ivh http://repo.webtatic.com/yum/centos/5/`uname -i`/webtatic-release-5-0.noarch.rpm
4) We have two options here:
Install:
Code:
yum --enablerepo=webtatic install php
or Update:
Code:
yum --enablerepo=webtatic update php
(If this does not work please try to disable regular repo's by adding the --disablerepo=* flag before the --enablerepo=webtatic flag)
Installing or Upgrading Ioncube 5.3
1) Go to http://www.ioncube.com/loaders.php and download the latest version for your OS. (I prefer zip format)
Right Click the URL, Copy, and paste like so:
Code:
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip
(The example url is the latest 64 bit version, at the time of this post)
2) Untar the file or unzip it:
Untar:
Code:
tar xvfz ioncubeX.X.tar.gz
or Unzip:
Code:
unzip ioncubeX.X.tar.gz
3) Go into the ioncube directory you just unpacked:
4) Move the ioncube php extension to the php extensions directory.
Code:
cp ioncube_loader_lin_5.3.so /usr/lib64/php/modules/ioncube_loader_lin_5.1.so
(This is the correct directory on most 64 bit systems. If this is incorrect run 'ls -lai /usr' and check to see where it is.)
5) Now you need to create a new file and insert the following code into it:
Create/open the file:
Code:
nano /etc/php.d/ioncube.ini
Insert this code:
Code:
; Enable ioncube extension module
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.1.so
That's it!
Restart or Gracefully Restart Apache via Interworx, and your all set! This has been verified on both x86-32 bit and x86-64 bit CentOS 5.4 installs.