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

How to check whether php is installed in linux

王林
Release: 2020-04-25 11:00:42
Original
3008 people have browsed it

How to check whether php is installed in linux

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

php -v
Copy after login

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

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

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

How to check whether php is installed in linux Recommended 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!

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