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.
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.
2. Enter: php -v
, and then press Enter.
The detailed information of the PHP installation will be printed out, so that the PHP installation status can be detected.
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!