查看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 mysql –help | grep Distrib
mysql -V
mysql/bin/mysql -u root -p -e “select version()”
/bin mysqladmin version
查看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
查看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'"
参考:http://rfyiamcool.blog.51cto.com/1030776/743323