Upgrade the CentOS 7-brought PHP 5.4 to 5.6

Source: Internet
Author: User
Tags zend

1, php-v php 5.4.16 (CLI) (Built:nov 6 00:29:02) Copyright (c) 1997-2013 the PHP groupzend Engine v2.4.0, copyright (c) 1998-2013 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 remove the PHP yum remove Php-common and then ask if you want to continue with the installation, enter Yes to Yum list installed | grep php yum remove php56w.x86_64 yum remove ....

  

4, install the PHP 5.6 version yum install-y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-int L php56w-mbstring

  

5. Installing PHP Fpmyum Install php56w-fpmsystemctl enable Php-fpm.service "boot from Start"/bin/systemctl start Php-fpm.service " Start PHP-FPM "

  

6. View version PHP 5.6.31 (CLI) (built:sep 18:12:46) Copyright (c) 1997-2016 the PHP groupzend Engine v2.6.0, Copyright (c ) 1998-2016 Zend technologieswith Zend opcache V7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Sed-i ' s/^;d ate\.timezone\ =/date\.timezone\ =\ "Asia\/shanghai"/'/etc/php.inised-i ' s/^user\ =\ apache/user\ =\ nginx/ '/etc/php-fpm.d/www.confsed-i ' s/^group\ =\ apache/group\ =\ nginx/'/etc/php-fpm.d/www.conf

/bin/systemctl Restart Php-fpm.service/bin/systemctl Restart Nginx.service

  

Upgrade the CentOS 7-brought PHP 5.4 to 5.6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.