centos tutorials for installing php5 uninstalling php and installing php7

  • 2021-06-28 09:54:14
  • OfStack

It's easy to install php5 first

yum install php

Then uninstall if you don't want to use php5. Note that using only the yum remove command doesn't work

Let's start

yum remove php

Then you need

rpm -qa | grep php

To see what php and its installed dependencies (packages) are, then uninstall them one by one

for example

Then uninstall one by one with the following commands

rpm -e

for example

Then let's install php7 and its common uses

Update yum source first

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Then simply install php7

yum install php70w

This tutorial is for centos7 system centos6 which may not have the same source and needs other sources

But it's better to use docker

summary


Related articles: