首页 热点资讯 义务教育 高等教育 出国留学 考研考公

如何查看linux系统中linux,apache,nginx,mysql,php版本

发布网友 发布时间:2022-04-23 06:18

我来回答

3个回答

懂视网 时间:2022-04-30 13:05

编译参数的命令如下:

1、nginx编译参数:
#/usr/local/nginx/sbin/nginx -V
2、apache编译参数:
# cat /usr/local/apache/build/config.nice
3、php编译参数:
# /usr/local/php/bin/php -i |grep configure
4、mysql编译参数:
# cat /usr/local/mysql/bin/mysqlbug|grep configure

查看Nginx、apache、MySQL和PHP的编译参数

标签:查看nginx、apache、mysql和php的编译参数

热心网友 时间:2022-04-30 10:13

版本的单词version,简写v。

apache

root@ubuntu:~# apachectl -v
Server version: Apache/2.4.7 (Ubuntu)
Server built:   Jul 15 2016 15:34:04

nginx

root@ubuntu:~# nginx -v
nginx version: nginx/1.4.6 (Ubuntu)

php

root@ubuntu:~# php -v
PHP 5.5.9-1ubuntu4.19 (cli) (built: Jul 28 2016 19:31:33)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

如果是编译安装,需定义环境变量。

热心网友 时间:2022-04-30 11:31

查看linux发行版本
lsb_release -a head -n1 /etc/issue cat /etc/redhat-release (适用redhat) rpm -q redhat-release (适用redhat)

查看内核版本
cat /proc/version uname -a uname -r

查看apache版本
/usr/sbin/apachectl -v httpd -v

安装目录,使用apachectl -v
mysql版本查看
mysql –help | grep Distrib mysql -V mysql/bin/mysql -u root -p -e “select version()” /bin mysqladmin version

查看php版本
php -v phpinfo();

查看nginx版本
nginx -V

Linux下查看nginx,apache,mysql,php的编译参数
1、nginx编译参数:

#/usr/local/nginx/sbin/nginx -V

nginx version: nginx/0.6.32
built by gcc 4.1.2 20071124 (Red Hat 4.1.2-42)
configure arguments: --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_mole --with-openssl=/usr/local/openssl

2、apache编译参数:

# cat /usr/local/apache/build/config.nice #/usr/local/apache/bin/apachectl -V #cat $apachehome$/build/config.nice

#! /bin/sh
# Created by configure
"./configure" \
"--prefix=/usr/local/apache2" \
"--with-included-apr" \
"--enable-so" \
"--enable-deflate=shared" \
"--enable-expires=shared" \
"--enable-rewrite=shared" \
"--enable-static-support" \
"--disable-userdir" \
"$@"

3、php编译参数:

# /usr/local/php/bin/php -i |grep configure #$PHP$/bin/php -i | grep configure # /usr/local/php/bin/php-config

Configure Command => './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-config-file-path=/usr/local/php/etc' '--with-mysql=/usr/local/mysql' '--with-libxml-dir=/usr/local/libxml2/bin' '--with-gd=/usr/local/gd2' '--with-jpeg-dir' '--with-png-dir' '--with-bz2' '--with-xmlrpc' '--with-freetype-dir' '--with-zlib-dir'

4、mysql编译参数:

cat "/usr/local/mysql/bin/mysqlbug"|grep configure

# This is set by configure
CONFIGURE_LINE="./configure '--prefix=/usr/local/mysql' '--localstatedir=/var/lib/mysql' '--with-comment=Source' '--with-server-suffix=-H863' '--with-mysqld-user=mysql' '--without-debug' '--with-big-tables' '--with-charset=gbk' '--with-collation=gbk_chinese_ci' '--with-extra-charsets=all' '--with-pthread' '--enable-static' '--enable-thread-safe-client' '--with-client-ldflags=-all-static' '--with-mysqld-ldflags=-all-static' '--enable-assembler' '--without-isam' '--without-innodb' '--without-ndb-debug'"

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com