Home  >  Article  >  Backend Development  >  How to install php on centos7

How to install php on centos7

王林
王林Original
2019-10-14 17:57:522168browse

How to install php on centos7

1. First, let’s get the yum source of PHP7.0 and execute the following command:

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

2. After the acquisition is successful, we can use the following command to Check the extension name of php7.0. You can install it according to your own requirements. Check the extension instructions:

yum search php70w

3. After checking the extension names, you can choose a few to install according to your requirements. I recommend installing these below. It’s general, just give the instructions directly. You can install any extensions you want later, don’t worry, the instructions are the same, yum install {write extension}.

Installation instructions:

yum install php70w php70w-fpm php70w-cli php70w-common php70w-devel 
php70w-gd php70w-pdo php70w-mysql php70w-mbstring php70w-bcmath

During installation, you have to enter Y twice and press Enter before the installation will continue. Just enter it obediently.

4. The installation is successful. Let me check if the installation is successful. Enter the following command to see the version and try it!

Instructions:

php -v

If you can see the content in the picture below, it proves that the installation is successful!

Recommended tutorial: PHP video tutorial

The above is the detailed content of How to install php on centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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