Home>Article>Backend Development> How to check if php is installed on centos

How to check if php is installed on centos

青灯夜游
青灯夜游 Original
2021-10-09 11:23:47 2856browse

How to check whether php is installed in centos: 1. Log in to the CentOS server, open the terminal, and execute the "php -v" command. If the details of the php installation are output, the installation is successful. 2. In the terminal, execute the "rpm -qa | grep php" command to check whether there is a PHP package.

How to check if php is installed on centos

The operating environment of this tutorial: CentOS 7.1.6 system, PHP version 7.1, Dell G3 computer.

centos method to check whether php is installed

Method 1:

1. First Log in to the CentOS server and open the terminal.

How to check if php is installed on centos

2. Enter:php -v, and then press Enter.

How to check if php is installed on centos

The detailed information of the PHP installation will be printed out, so that the PHP installation status can be detected.

How to check if php is installed on centos

Method 2: Use rpm to query PHP packages

rpm -qa | grep php

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to check if php is installed on centos. 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