PHP7-centos-300x220

How to install PHP 7.X in to CentOS 7.X

CentOS7plusPHP7-720x210
Step 1 : sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Step 2 : sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Step 3 : sudo yum install -y mod_php71w php71w-cli php71w-common php71w-gd php71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-xml
if any conflicts due to old php version while installing php 7.X then
Step 4 : Check the installed php packeges in to the system
rpm -qa | grep php
Step 5 : uninstall PHP listed packages in the step 4 uing
yum remove Step 6 : Remove php Folder from /etc folder
Step 7 : Start from Step 1
Step 8 : If php is installed then restert apache using following command
sudo systemctl restart httpd.service

Leave a Reply

Your email address will not be published. Required fields are marked *