1. Install epel and remi repositories:
1 2 3 | # sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm |
2. Enable remi repository:
In the [remi] section of the file, set the “enabled” option to 1.
1 | # sudo vi /etc/yum.repos.d/remi.repo |
3. Upgrade PHP with this command:
1 | # yum install php |
Installation of Other modules and extensions for php 5.4.x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # yum search imagick # yum install php-pecl-imagick.x86_64 # yum search soap # yum install php-soap.x86_64 # yum search git # yum install git.x86_64 # yum search nodejs # yum install nodejs.x86_64 # yum search python # yum install python.x86_64 # reboot # /etc/init.d/httpd restart # yum search denyhosts # yum install denyhosts |
For more details regarding denyhosts read this post
Installation of ionCube for PHP 5.4 (optional)
1. Download ionCube: For x32:
For x64:
2. Unzip file.
3. Copy ioncube_loader_lin_5.4.so to PHP extensions folder:
1 | # sudo cp ioncube/ioncube_loader_lin_5.4.so /usr/lib/php/modules/ |
4. Set SELinux attributes:
1 | # sudo chcon -u system_u -t textrel_shlib_t /usr/lib/php/modules/ioncube_loader_lin_5.4.so |
5. Switch on ionCube in PHP config:
1 | # echo "zend_extension=/usr/lib/php/modules/ioncube_loader_lin_5.4.so" >> /etc/php.d/zend_extensions_psa.ini |
6. Check functioning of ionCube:
1 | # php -r 'phpinfo();' | grep -i ioncube |
You can also test ionCube Loader by using the helper PHP script “loader-wizard.php” that’s included in the ionCube Loader archive.