Specify version to install PHP (remove default php5.3, install php5.6)

Source: Internet
Author: User
Tags install php php software zend yum repolist

Yum installed php default version is too low, manual installation has some trouble, want to use Yum installation can be used the following scenario:
First delete the old version of PHP, by

Yum List Installed | grep php

can view all installed PHP software, using

Yum Remove PHP

Delete.

Yum Remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-devel.x86_64 php-gd.x86_64 php-mbstring.x86_64 php-pdo.x86_ Php-xml.x86_64

With Yum list php* to see if there is a version you need to install, if you do not need to add a third party yum Source, it is recommended to install Webtatic, Rpmforge, as well as 163 of the domestic.

Centos5. x rpm-UVH http://mirror.webtatic.com/yum/el5/latest.rpmCentos6. x rpm-UVH http://mirror.webtatic.com/yum/el6/latest.rpmCentos7. X rpm-UVH https://mirror.webtatic.com/yum/el7/epel-release.rpmRPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm//Rpmforge#32位: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpmRPM-IVH rpmforge-release-0.5.1-1. el5.rf.i386.rpm #64位: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpmRPM-IVH rpmforge-release-0.5.1-1. el5.rf.x86_64.rpm

After the installation is complete, you can use Yum repolist to view the installed sources or to view them through ls/etc/yum.repos.d/.

Then yum install php55w or yum install php54w or yum install php56w| | Yum Install php70w ... You can install a new version of PHP.


1. Home installation webtatic EL6 Yum source

RPM-UVH http://repo.webtatic.com/yum/el6/latest.rpm

2. Stop the Web server

Service Nginx Stop

Or

Service httpd Stop

3. Remove the current PHP installation php5.4

Yum Remove php*yum install php54w

4. Restart the Web server

Service php-fpm restartservice nginx start

Or

Service httpd Restart

5. View PHP Version

Php-v

PHP 5.4.33 (CLI) (built:sep 19 2014 19:58:27)

Copyright (c) 1997-2014 the PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

---------------------------------------------------------------
Here to install php5.6 example with centos5.6

Yum List Installed | grep phpyum Remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-devel.x86_64 php-gd.x86_64 php-mbstring.x86_64 php-pdo.x86_64 php--UVH http://service httpd stopservice mysqld Stopyum Install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-devel.x86_64 php56w--V

Specify version to install PHP (remove default php5.3, install php5.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.