Skip to main content

Install PHP

Installing PHP

Installing Repositories

  1. If not already installed, install the EPEL repository with the command below

    yum install epel-release

  2. Install the Remi repository to get the latest versions of PHP with the command below

    yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

  3. If not already installed, install yum-utils

    If not already installed, install

  4. Use yum-config-manager (a utility provided by yum-utils), to Remi repository as the default repository for installing PHP,  [xx] represents the version of PHP

    yum-config-manager --enable remi-php[xx] 

Installing PHP

  1. Install PHP with the command below with the default set of "add-ons" used by most PHP applications
yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo