Install PHP 5 in Red Hat Enterprise Linux 5

www.la‮tu‬turi.com
Install PHP 5 in Red Hat Enterprise Linux 5

To install PHP 5 on Red Hat Enterprise Linux 5, you can use the following steps:

  1. Add the repository for PHP 5:
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el5/latest.rpm

This will add the Extra Packages for Enterprise Linux (EPEL) and Webtatic repositories to your system, which contain packages for PHP 5.

  1. Install PHP 5:
sudo yum install php55w

This will install the latest version of PHP 5 available in the repositories.

  1. Restart the Apache web server:
sudo service httpd restart

This will apply the changes and make PHP 5 available to your web server.

  1. Test the installation:

Create a PHP file in the document root of your web server with the following code:

<?php
phpinfo();
?>

Save the file and access it from a web browser. You should see a page with information about your PHP installation, indicating that PHP 5 is working correctly.

Created Time:2017-10-29 22:08:49  Author:lautturi