如何查看linux系统中linux,apache,nginx,mysql,php版本
2个回答
展开全部
版本的单词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
如果是编译安装,需定义环境变量。
快又稳
2024-10-28 广告
2024-10-28 广告
Apache基于域名的虚拟主机配置主要涉及到在Apache配置文件中为不同域名指定不同的网站目录和日志路径。配置时,需确保域名已正确指向服务器的IP地址。在Apache的`httpd-vhosts.conf`或类似配置文件中,为每个域名创建...
点击进入详情页
本回答由快又稳提供
展开全部
查看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_module --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'"
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_module --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'"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询