Home > Backend Development > PHP Problem > Linux upgrade php method

Linux upgrade php method

藏色散人
Release: 2023-02-24 10:12:02
Original
4981 people have browsed it

Linux upgrade php method

linux upgrade php method

1 Check the current php version of the terminal

php -v
Copy after login
Copy after login

will give the following feedback Information:

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
Copy after login

2 Upgrade software warehouse

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

3 yum remove php-common

There will be a prompt y/n: Enter yes

4 Install php5.6

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

5 Restart httpd

service httpd restart
Copy after login

Check whether it is the latest version

php -v
Copy after login
Copy after login
PHP 5.6.24 (cli) (built: Jul 21 2016 14:27:54)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
Copy after login

Upgrade successful

The above is the detailed content of Linux upgrade php method. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template