How to install php on centos7

王林
Release: 2023-02-26 16:36:02
Original
2180 people have browsed it

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
Copy after login

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
Copy after login

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
Copy after login

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
Copy after login

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!

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