Oracle Linux is a free RHEL based Linux distro. We will install PHP 5.6 on an Oracle Linux 7 server.
First, enable EPEL repo
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Enable Remi repo
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Install yum-utils package
yum install yum-utils
Enable remi-php56
yum-config-manager --enable remi-php56
Install PHP 5.6 with
yum install -y php php-bcmath php-cli php-common php-devel php-gd \ php-imap php-intl php-json php-ldap php-lz4 php-mbstring php-mysqlnd \ php-soap php-intl php-opcache php-xml php-pdo
This will only install the CLI version of PHP 5.6. To make Apache work with PHP 5.6, install
yum install php-pecl-http.x86_64
This will create file /etc/httpd/conf.d/php.conf, that enable PHP module in Apache.
Restart apache webserver
systemctl restart httpd
Now Apache will be able to serve PHP files.
Leave a Reply