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

How to check if php is installed on centos

青灯夜游
Release: 2023-03-13 08:26:01
Original
3069 people have browsed it

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

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!

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