Home>Article>Operation and Maintenance> How to check whether php is installed in linux

How to check whether php is installed in linux

王林
王林 Original
2020-04-25 11:00:42 2787browse

How to check whether php is installed in linux

1. Check the current php version through the php -v command

php -v

If php is not installed, you will generally be prompted that there is no php command.

How to check whether php is installed in linux

(Video tutorial recommendation:linux video tutorial)

2. Check whether there is php

# in the installed package ## Taking redhat as an example, you can execute the following command:

rpm -qa | grep php

As shown in the figure below, it means that php is installed.

How to check whether php is installed in linux##3. Use the list parameter of the pear command to view the installed PHP support

pear is a PHP extension and application repository ("PHP Extension and Application Repository") abbreviation of. After installing php, some of pear's libraries will be automatically installed by default, so you can use the pear command to determine whether to install php. Execute the following command:

pear list

As shown in the figure below, it means it is installed. php.

How to check whether php is installed in linuxRecommended tutorial:

linux tutorial

The above is the detailed content of How to check whether php is installed in linux. 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