Practical method of upgrading PHP to 5.6 in Linux

Practical method of upgrading PHP to 5.6 in Linux

1: Check the PHP version after entering the terminal

php -v

The output may be as follows:

PHP 5.4.35 (cli) (built: Nov 14 2014 07:04:10) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

2: Execute the following command to upgrade the software warehouse

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

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

3: Execute the following command to delete php

yum remove php-common

Then it will ask you if you want to continue, just type yes.

4: Install PHP 5.6 version (php56w-devel is not required)

yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring

5: Restart httpd

service httpd restart

View the latest version

php -v

It should be 5.6 now!

The above is the relevant knowledge points about how to upgrade PHP to 5.6 under Linux. Thank you for your learning and support for 123WORDPRESS.COM.

You may also be interested in:
  • Detailed example of compiling and installing PHP 5.6 under Linux 6

<<:  Detailed explanation of the differences between SQL joint query inner join, outer join and cross join

>>:  JavaScript implements simple scroll window

Recommend

JavaScript to achieve stair rolling special effects (jQuery implementation)

I believe everyone has used JD. There is a very c...

Importance of background color declaration when writing styles

As the title says, otherwise when the page is revi...

Detailed explanation of the top ten commonly used string functions in MySQL

Hello everyone! I am Mr. Tony who only talks abou...

Discussion on more reasonable creation rules for MySQL string indexes

Preface Regarding the use of MySQL indexes, we ha...

Things to note when designing web pages for small-screen mobile devices

The reason is that this type of web page originate...

Why MySQL does not recommend deleting data

Table of contents Preface InnoDB storage architec...

MySQL5.7.21 decompressed version installation detailed tutorial diagram

Since I often install the system, I have to reins...

How to configure Bash environment variables in Linux

Shell is a program written in C language, which i...

Copy fields between different tables in MySQL

Sometimes, we need to copy a whole column of data...

Detailed explanation of the use of the <meta> tag in HTML

In the web pages we make, if we want more people ...

An article to help you understand the basics of VUE

Table of contents What is VUE Core plugins in Vue...

Detailed analysis of mysql MDL metadata lock

Preface: When you execute a SQL statement in MySQ...