1. Install epel and remi repositories:
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm # 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.
# sudo vi /etc/yum.repos.d/remi.repo
3. Upgrade PHP with this command:
# yum install php
Installation of Other modules and extensions for php 5.4.x
# 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:
# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.zip
For x64:
# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip
2. Unzip file.
3. Copy ioncube_loader_lin_5.4.so to PHP extensions folder:
# sudo cp ioncube/ioncube_loader_lin_5.4.so /usr/lib/php/modules/
4. Set SELinux attributes:
# 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:
# 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:
# 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.