Tutorial on installing php5, uninstalling php, and installing php7 on centos

Tutorial on installing php5, uninstalling php, and installing php7 on centos

First, install PHP5 very simple

yum install php

Then if you don't want to use PHP5, just uninstall it. Note that using only the yum remove command will not work.

Then let's first

yum remove php

Then you need

rpm -qa | grep php

To check PHP and its installed dependencies (packages), and then uninstall them one by one

for example

Then uninstall them one by one using the following command

rpm -e

for example

Then let's install php7 and its common

Update the 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 may have different sources and requires other sources.

But it is better to use docker

Summarize

The above is the tutorial on installing PHP5, uninstalling PHP, and installing PHP7 on CentOS introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Summary of the differences between PHP5 and PHP7
  • A brief discussion on the differences between PHP5.6 and PHP7.0
  • Summary of features from php5.6.x to php7.0.x
  • Example of using PHP7 to connect to SQL Server 2008 R2 database using ODBC [Based on thinkPHP5.1 framework]
  • PHP7 and PHP5 specific differences and examples

<<:  Unzipped version of MYSQL installation and encountered errors and solutions

>>:  Using react-virtualized to implement a long list of images with dynamic height

Recommend

MySQL Series 8 MySQL Server Variables

Tutorial Series MySQL series: Basic concepts of M...

Detailed steps for developing Java payment interface for Alipay

Table of contents first step Step 2 Step 3 Step 4...

VMware virtual machine installation Linux system graphic tutorial

This article shares the specific steps of VMware ...

Solutions to MySQL batch insert and unique index problems

MySQL batch insert problem When developing a proj...

js to realize payment countdown and return to the home page

Payment countdown to return to the home page case...

Should I abandon JQuery?

Table of contents Preface What to use if not jQue...

How to dynamically add modules to Nginx

Written in front Often, after we install Nginx ba...

Example code for implementing a hollow mask layer with CSS

Contents of this article: Page hollow mask layer,...

MYSQL uses Union to merge the data of two tables and display them

Using the UNION Operator union : Used to connect ...

CSS Standard: vertical-align property

<br />Original text: http://www.mikkolee.com...

Example of utf8mb4 collation in MySQL

Common utf8mb4 sorting rules in MySQL are: utf8mb...

When is it appropriate to use dl, dt, and dd?

dl:Definition list Definition List dt:Definition t...

A brief discussion on browser compatibility issues in JavaScript

Browser compatibility is the most important part ...