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

Button is stretched on both sides in IE

When you write buttons (input, button), you will f...

Some Linux file permission management methods you may not know

Why do we need permission management? 1. Computer...

Common styles of CSS animation effects animation

animation Define an animation: /*Set a keyframe t...

Nginx signal control

Introduction to Nginx Nginx is a high-performance...

How to install tomcat8 in docker

1. Install tomcat8 with docker 1. Find the tomcat...

Steps to deploy hyper-V to achieve desktop virtualization (graphic tutorial)

The hardware requirements for deploying Hyper-V a...

Dynamic SQL statement analysis in Mybatis

This article mainly introduces the dynamic SQL st...

A brief talk about the diff algorithm in Vue

Table of contents Overview Virtual Dom principle ...

Problems with using wangeditor rich text editing in Vue

wangEditor is a web rich text editor developed ba...

mysql5.7.21.zip installation tutorial

The detailed installation process of mysql5.7.21 ...

How to add double quotes in HTML title

<a href="https://www.jb51.net/" titl...

A brief discussion on the calculation method of key_len in mysql explain

The MySQL explain command can analyze the perform...

Understanding and example code of Vue default slot

Table of contents What is a slot Understanding of...

Three ways to configure JNDI data source in Tomcat

In my past work, the development server was gener...