Home > Backend Development > PHP Tutorial > How to install php5.5, php5.6 and php7.0 instances with yum

How to install php5.5, php5.6 and php7.0 instances with yum

黄舟
Release: 2023-03-16 20:06:01
Original
2678 people have browsed it

1. Clean up the old version of php on the system

# You can use the following methods

rpm -qa|grep php*yum list installed | grep php
Copy after login

# Generally, the following software needs to be cleaned

yum remove php php-devel php-cli php-common php-gd php-ldap php-mbstring php-mcrypt php-mysql php-pdo php55w-fpm
Copy after login

# Note: You are using yum uninstall software. Before uninstalling, please check to make sure that the software you are using will not be deleted to prevent errors.

2.Updatephp related yum source on the system

Applicable to CentOS5.x

rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
Copy after login

# Applicable to CentOS6.x

rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Copy after login

# Applicable For CentOS7.x

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

3.InstallationRequired php version

Installation related to php5.5 Software

yum install php55w php55w-devel php55w-cli php55w-common php55w-gd php55w-ldap php55w-mbstring php55w-mcrypt php55w-pdo php55w-mysql php55w-fpm
Copy after login

# Install php5.6 related software

yum install php56w php56w-devel php56w-cli php56w-common php56w-gd php56w-ldap php56w-mbstring php56w-mcrypt php56w-pdo php56w-mysql php56w-fpm
Copy after login

# Install php7.0 related software

yum install php70w php70w-devel php70w-cli php70w-common php70w-gd php70w-ldap php70w-mbstring php70w-mcrypt php70w-pdo php70w-mysql php70w-fpm
Copy after login

# After the installation is complete, you can use the following command to check

php -v
Copy after login

The above is the detailed content of How to install php5.5, php5.6 and php7.0 instances with yum. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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