Install Php Apache Centos 7 Epel

In this article, we will outline the process of installing PHP 7.x on CentOS 7 Server. Prerequisites: An up-to-date CentOS 7 Server.; A sudo user.; Step 1: Setup the Webtatic YUM repo. Precompiled PHP 7.x binaries are available for CentOS 7 from the Webtatic, IUS, or Remi's RPM repositories. Below are instructions on installing PHP 7.x using. The PHP team has released upgrade version 7.2. Which has a number of changes and improvements than over version 5.X. This article will help you to install PHP 7 Apache 2.4 and MySQL 5.6 on CentOS/RHEL 7 & 6 operating systems.

Read Also: Install and Enable RPMForge Repository in RHEL/CentOS 7/6/5/4. What is EPEL. EPEL (Extra Packages for Enterprise Linux) is open source and free community based repository project from Fedora team which provides 100% high quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS. Yum -y install epel-release. Since I wanted to show you how to test the connection to the MariaDB server using PHP 7, I figured it would be best to install phpMyAdmin. PhpMyAdmin is a PHP application that allows you to manage MySQL and MariaDB databases through a web interface. 3 Comments on “How to Install Apache 2. How to Install LAMP Stack (Apache 2.4, MySQL 5.6, and PHP 5.4) on CentO7S/RHEL 7. Installing Apache, PHP and MySQL setup on CentOS and Red Hat 7. How To Install Apache, MySQL, PHP (LAMP) stack on CentOS 7 and RHEL 7. Install Apache, MySQL, PHP 5.6 on Centos 7. Install Apache # yum update # yum install httpd # systemctl start httpd.service. Install PHP 5.6. Install EPEL repository. How to install PHP 7.* on CentOS 7. (epel and webtatic). Installing these packages will allow you to leverage your package. If you need to use PHP with apache.

Active1 year, 11 months ago

I have a Centos 7 server running apache 2.4.6 and php 5.4. I'm trying to install Magento 2 on my server for a client but am having issues. Liz carlyle.

I need to have PHP 5.5 or 5.6 installed on my server for Magento 2 to run. I cannot figure out how to upgrade to PHP 5.5 or PHP 5.6.

I don't know the difference between the two versions, so I'll take whatever I can get working !

Thanks :)

Brandon StewartBrandon Stewart
3122 gold badges5 silver badges23 bronze badges

3 Answers

This is the procedure for PHP 5.6.

I was able to upgrade PHP 5.4.16 on CENTOS7 to version 5.6.25 with these simple steps. Important to note that i used the Software Collection Repositories.

1- Install All these new packages:

  • yum install centos-release-scl
  • yum install rh-php56
  • yum install rh-php56-php
  • yum install rh-php56-php-pdo
  • yum install rh-php56-php-devel
  • yum install rh-php56-php-mysql
  • yum install rh-php56-php-fpm

2- Make apache 2.4 use php-fpm

Edit that file: /etc/httpd/conf.d/php.confPut that content:

3- Reboot services to handle php-fpm:

  • systemctl restart rh-php56-php-fpm
  • systemctl restart httpd

4- Enabling rh-php56-php-fpm service on boot time

  • systemctl enable rh-php56-php-fpm
  • systemctl enable httpd

Install Php Centos

5- Create a symlink for the new php version.

  • mv /usr/bin/php /usr/bin/phpOLD
  • ln -s /opt/rh/rh-php56/root/bin/php /usr/bin/php
Sebastien FilionSebastien Filion

Run this in your terminal:wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpmwget http://rpms.famillecollet.com/enterprise/remi-release-7.rpmrpm -Uvh remi-release-7*.rpm epel-release-7*.rpm

Centos 7 Iso

Then :sudo yum install php php-gd php-mysql php-mcrypt

Install Php 5.6 Centos 7

and you should have php 5.5

Nikolay NikolovNikolay Nikolov

Steps (Use sudo only if required)

1) Remove OLD Apache

2) Remove OLD PHP

if it´s a clean installation start from here:

3) Install PHP 5.6 (Apache 2.4 will be automatically installed with this)

4) Make sure all the required PHP extensions are installed

5) If not then install them using

6) To list the other available php extensions

7) PHP 5.6 MySQL extension (Assume you have already installed MySQL)

(NOTE: it is not php56-mysql)

8) Start / Restart Apache

9) Check the version

MCSellMCSell

Php Apache Centos

Not the answer you're looking for? Browse other questions tagged centos7php-5.5 or ask your own question.