Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 updates php5.4 to php5.6/php7

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The centos7 system yum installs version 5.4 of php.

Due to business requirements, development may require a php5.6 environment.

This article is based on the need to upgrade from php5.4 to php5.6.

To update to the php7 environment, the steps are the same.

If it is an online application, please test and assess the risk before upgrading.

1. View the current version of php

Php-v

two。 Install a third-party package

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

3. Remove the default installation

Yum remove php-common

4. Install the php expansion pack

Yum install php56w php56w-pdo php56w-gd php56w-mbstring php56w-mcrypt php56w-mysql

5. View

Ls / usr/lib64/php/modules/

6. Configure php

Vim / etc/php.ini 
 date.timezone = Asia/Shanghai 
 extension_dir = "/ usr/lib64/php/modules/"

7. Check again to see if the php version has been updated

Php-v

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report