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

Analyze Mysql transactions and data consistency processing issues

This article analyzes the consistency processing ...

Detailed explanation of web page loading progress bar (recommended)

(When a web page is loading, sometimes there is t...

Essential knowledge for web development interviews and written tests (must read)

The difference between inline elements and block-...

A brief understanding of MySQL SELECT execution order

The complete syntax of the SELECT statement is: (...

mysql 8.0.12 winx64 download and installation tutorial

MySQL 8.0.12 download and installation tutorial f...

Simple comparison of meta tags in html

The meta tag is used to define file information an...

Vue ElementUI implements asynchronous loading tree

This article example shares the specific code of ...

Implementation of vue+drf+third-party sliding verification code access

Table of contents 1. Background 2. Verification p...

JavaScript data structure bidirectional linked list

A singly linked list can only be traversed from t...

Introduction to the use of MySQL pt-slave-restart tool

Table of contents When setting up a MySQL master-...

About the pitfalls of implementing specified encoding in MySQL

Written in front Environment: MySQL 5.7+, MySQL d...

Docker implements re-tagging and deleting the image of the original tag

The docker image id is unique and can physically ...

10 reasons why Linux is becoming more and more popular

Linux has been loved by more and more users. Why ...

Fixed a bug caused by scrollbar occupying space

background This bug was caused by滾動條占據空間. I check...