如何查看linux是否安装php环境

如题所述

查看linux是否安装php环境,步骤如下:

    登录linux,查看是否安装了php,输入如下命令:

php -v

如果输出以下信息则说明安装了php。

PHP 5.4.45 (cli) (built: Oct 11 2016 23:35:56) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.6, Copyright (c) 2002-2016, by ionCube Ltd.
    with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

效果图:

2.查看是否安装mysql,输入以下命令:

mysql -V

输出以下信息则说明安装了mysql,具体版本是你安装的mysql版本。

mysql  Ver 14.14 Distrib 5.5.48, for Linux (x86_64) using readline 5.1

效果图:

3.查看是否安装nginx,如果以下命令:

查看是否安装nginx的命令:

nginx -v

输出:

nginx version: nginx/1.10.0

效果图:

注意事项:centos7下测试,redhat下适用。

温馨提示:内容为网友见解,仅供参考
第1个回答  2016-11-19

直接执行命令:

php -v

如果成功的话,会出现:

PHP 5.6.21 (cli) ......