1. 查看linux的内核版本,系统信息,常用的有三种办法:

uname -a; cat /proc/version;

-bash-4.2$ uname -a
Linux apphost 3.10.-514.26..el7.x86_64 # SMP Tue Jul :: UTC x86_64 x86_64 x86_64 GNU/Linux
-bash-4.2$ cat /proc/version
Linux version 3.10.-514.26..el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8. (Red Hat 4.8.-) (GCC) ) # SMP Tue Jul :: UTC

2. 查看apache的版本信息,如果是通过yum,或者是rpm安装的,可以使用rpm -qa |gerp httpd 来查看;

-bash-4.2$ rpm -qa | grep httpd
httpd-2.4.-.el7.centos.x86_64
httpd-tools-2.4.-.el7.centos.x86_64

还可以通过httpd -v来查询;

-bash-4.2$ httpd -v
Server version: Apache/2.4. (CentOS)
Server built: Apr ::

3.查看php的版本信息,如果是通过yum,或者是rpm包安装的,可以使用rpm -qa |grep php来查看;

-bash-4.2$ rpm -qa | grep php
php-common-5.4.-.el7.x86_64
php-5.4.-.el7.x86_64
php-cli-5.4.-.el7.x86_64
php-gd-5.4.-.el7.x86_64
php-devel-5.4.-.el7.x86_64
php-pdo-5.4.-.el7.x86_64
php-mbstring-5.4.-.el7.x86_64
php-process-5.4.-.el7.x86_64
php-mcrypt-5.4.-.el7.x86_64
php-mysqlnd-5.4.-.el7.x86_64

同样,也可以使用php -v来查看php的版本信息;

-bash-4.2$ php -v
PHP Warning: Module 'pcntl' already loaded in Unknown on line
PHP 5.4. (cli) (built: Nov ::)
Copyright (c) - The PHP Group
Zend Engine v2.4.0, Copyright (c) - Zend Technologies

4. 查看mysql的版本信息,如果是通过yum安装的,或者是rpm包安装的,可以使用rpm -qa |grep mysql 来查看;

-bash-4.2$ rpm -qa | grep mysql
mysql-community-server-5.7.-.el7.x86_64
mysql-connector-python-2.1.-.el7.x86_64
mysql-utilities-1.6.-.el7.noarch
mysql-community-client-5.7.-.el7.x86_64
mysql-community-libs-compat-5.7.-.el7.x86_64
mysql-community-common-5.7.-.el7.x86_64
mysql-community-libs-5.7.-.el7.x86_64
mysql57-community-release-el7-.noarch
php-mysqlnd-5.4.-.el7.x86_64

也可以使用mysql -v

-bash-4.2$ mysql -V
mysql Ver 14.14 Distrib 5.7., for Linux (x86_64) using EditLine wrapper

也可以进入mysql,然后通过命令status来查看;

-bash-4.2$ mysql -utangbing -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7. MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> status;
--------------
mysql Ver 14.14 Distrib 5.7., for Linux (x86_64) using EditLine wrapper Connection id:
Current database:
Current user: tangbing@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7. MySQL Community Server (GPL)
Protocol version:
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: days hours min sec Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 1.431
--------------

linux,apache,mysql,php常用查看版本信息的方法的更多相关文章

  1. linux,apache,php,mysql常用的查看版本信息的方法

    1. 查看linux的内核版本,系统信息,常用的有三种办法:   uname -a:   more /etc/issue;    cat /proc/version; 2. 查看apache的版本信息 ...

  2. Linux下如何查看版本信息

    Linux下如何查看版本信息, 包括位数.版本信息以及CPU内核信息.CPU具体型号等等,整个CPU信息一目了然.   1.# uname -a   (Linux查看版本当前操作系统内核信息)   L ...

  3. 如何在Linux下查看版本信息

    Linux下如何查看版本信息, 包括位数.版本信息以及CPU内核信息.CPU具体型号等等,整个CPU信息一目了然.   1.# uname -a   (Linux查看版本当前操作系统内核信息)   L ...

  4. Linux下如何查看版本信息(转)

    Linux下如何查看版本信息, 包括位数.版本信息以及CPU内核信息.CPU具体型号等等,整个CPU信息一目了然.   1.# uname -a   (Linux查看版本当前操作系统内核信息)   L ...

  5. Linux下查看版本信息

    Linux下如何查看版本信息, 包括位数.版本信息以及CPU内核信息.CPU具体型号等.   1.# uname -a   (Linux查看版本当前操作系统内核信息)   2.# cat /proc/ ...

  6. CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境

    一.简介 什么是LAMP    LAMP是一种Web网络应用和开发环境,是Linux, Apache, MySQL, Php/Perl的缩写,每一个字母代表了一个组件,每个组件就其本身而言都是在它所代 ...

  7. CentOS 6.3 源码安装LAMP(Linux+Apache+Mysql+Php)环境

    一.简介 什么是LAMP LAMP是一种Web网络应用和开发环境,是Linux, Apache, MySQL, Php/Perl的缩写,每一个字母代表了一个组件,每个组件就其本身而>言都是在它所 ...

  8. Centos下安装配置LAMP(Linux+Apache+MySQL+PHP)

    Centos下安装配置LAMP(Linux+Apache+MySQL+PHP)   关于LAMP的各种知识,还请大家自行百度谷歌,在这里就不详细的介绍了,今天主要是介绍一下在Centos下安装,搭建一 ...

  9. Linux+Apache+Mysql+Php

    CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境 一.简介 什么是LAMP    LAMP是一种Web网络应用和开发环境,是Linux, Apache, My ...

随机推荐

  1. 【Codeforces 242C】King's Path

    [链接] 我是链接,点我呀:) [题意] 让你找到(x0,y0)到(x1,y1)的一条最短路 走过的点必须在所给的n个横向路径上 [题解] 因为n条横向路径上的点最多不会超过10的5次方个,所以我们可 ...

  2. Neo4j ETL工具快速上手:简化从关系数据库到图数据库的数据迁移

    注:本文系从https://medium.com/neo4j/tap-into-hidden-connections-translating-your-relational-data-to-graph ...

  3. 20170613NOIP模拟赛

    共3道题目,时间3小时 题目非原创,仅限校内交流使用 题目名称 Graph Incr Permutation 文件名 graph incr permutation 输入文件 graph.in incr ...

  4. Python3基础(八) 模块

    在程序中定义函数可以实现代码重用.但当你的代码逐渐变得庞大时,你可能想要把它分割成几个文件,以便能够更简单地维护.同时,你希望在一个文件中写的代码能够被其他文件所重用,这时我们应该使用模块(modul ...

  5. __weak与__block区别分析

    API Reference对__block变量修饰符有如下几处解释: //A powerful feature of blocks is that they can modify variables ...

  6. 第一章--linux基础

    (一):linux系统根文件夹结构 Unix-like系统中的"文件系统"的概念包含两个意思,第一个是"根文件系统",第二个是"存储类文件系统&quo ...

  7. 【C++】双向线性链表容器的实现

    // 双向线性链表容器 #include <cstring> #include <iostream> #include <stdexcept> using name ...

  8. Prevent the "split brain" by configuring the majority of nodes

    ## Prevent the "split brain" by configuring the majority of nodes (total number of nodes / ...

  9. hibernate投影查询

    1. 投影查询就是想查询某一字段的值或者某几个字段的值 2. 投影查询的案例 * 如果查询多个字段,例如下面这种方式 List<Object[]> list = session.creat ...

  10. 【网易云音乐 for linux】 踩过的坑

    1.从官网下载的包,却怎么也安装不上. 提示依赖,网上全是什么 sudo apt-get -f install ,结果提示有没有完成安装的包,让我卸载. 于是按下Y卸载了网易云. 尝试一个个修复以来, ...