Install PHP5.5, 5.6, 7.0 in Yum in Centos

Source: Internet
Author: User
Tags mcrypt
The default version is too low and manual installation is troublesome. if you want to use Yum for installation, you can use the following solution: 1. check the currently installed PHP package yumlistinstalled | grepphp if there is an installed PHP package, delete them yumremovephp first. x86_64php-cli.x86

The default version is too low and manual installation is troublesome. if you want to use Yum for installation, you can use the following solution:

1. check the currently installed PHP package

Yum list installed | grep php

If you have installed PHP packages, delete them first.

Yum remove php. x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64

2. Centos

Rpm-Uvh http://mirror.webtatic.com/yum/el5/latest.rpm # CentOs 5.x
Rpm-Uvh http://mirror.webtatic.com/yum/el6/latest.rpm # CentOs 6.x
Https://mirror.webtatic.com/yum/el7/epel-release.rpm # CentOs 7.X rpm-Uvh
Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

If you want to delete the package installed above, reinstall it.
Rpm-qa | grep webstatic
The package found on rpm-e is enough.

3. run yum install

Yum install php55w. x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64
 

Yum 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-mcrypt.x86_64 php56w-mysql.x86_64


Note: If you want to upgrade to 5.6, replace 55 W with 56 W.

Yum install php70w. x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64
4. install PHP FPM

Yum install php55w-fpm
Yum install php56w-fpm
Yum install php70w-fpm

Related Article

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.