查看编译安装好的Nginx、Apache、MySQL、PHP的编译参数

1、Nginx,可以通过 -V 参数查看Nginx版本及编译参数

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

nginx version: nginx/1.10.2
built by gcc 4.4.6 20110731 (Red Hat 4.4.6-4) (GCC)
configure arguments: –prefix=/usr/local/nginx/ –with-http_image_filter_module –with-http_gunzip_module –with-http_gzip_static_module –with-http_dav_module –with-http_auth_request_module –with-http_secure_link_module –with-http_slice_module –with-http_stub_status_module –with-stream –with-pcre=/usr/local/tools/pcre-8.38 –with-zlib=/usr/local/tools/zlib-1.2.8

[hr]
2、Apache,编译参数存放在 apache 的 config.nice 文件,前提时,没有做过 make clean

locate config.nice | grep apache

/usr/local/apache2/build/config.nice

cat /usr/local/apache2/build/config.nice 

#! /bin/sh
#
# Created by configure

“./configure” \
“–with-apr=/usr/local/apr/” \
“–with-apr-util=/usr/local/apr-util/” \
“–with-pcre=/usr/local/pcre/” \
“ap_cv_void_ptr_lt_long=no” \
“–enable-proxy” \
“–enable-proxy-connect” \
“–enable-proxy-ftp” \
“–enable-proxy-http” \
“–enable-proxy-scgi” \
“–enable-proxy-ajp” \
“–enable-proxy-balancer” \
“$@”

[hr]
3、MySQL,利用 msyqlbug 工具,查看MySQL信息

VISUAL=vim; export VISUAL
mysqlbug


Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –with-bugurl=http://bugzilla.redhat.com/bugzilla –enab
le-bootstrap –enable-shared –enable-threads=posix –enable-checking=release –with-system-zlib –enable-__cxa_atexit –disable-libunwind-exceptions
–enable-gnu-unique-object –enable-languages=c,c++,objc,obj-c++,java,fortran,ada –enable-java-awt=gtk –disable-dssi –with-java-home=/usr/lib/jvm/j
ava-1.5.0-gcj-1.5.0.0/jre –enable-libgcj-multifile –enable-java-maintainer-mode –with-ecj-jar=/usr/share/java/eclipse-ecj.jar –disable-libjava-mul
tilib –with-ppl –with-cloog –with-tune=generic –with-arch_32=i686 –build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.6 20110731 (Red Hat 4.4.6-4) (GCC)
Compilation info (call): CC=’/usr/local/gcc-4.3.4/bin/gcc’ CFLAGS=’ -fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -D
DBUG_OFF -DMY_PTHREAD_FASTMUTEX=1′ CXX=’/usr/local/gcc-4.3.4/bin/g++’ CXXFLAGS=’ -fPIC -Wall -Wno-unused-parameter -fno-implicit-templates -fno-exce
ptions -fno-rtti -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1′ LDFLAGS=” ASFLAGS=”
Compilation info (used): CC=’/usr/local/gcc-4.3.4/bin/gcc’ CFLAGS=’ -fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -D
DBUG_OFF -DMY_PTHREAD_FASTMUTEX=1′ CXX=’/usr/local/gcc-4.3.4/bin/g++’ CXXFLAGS=’ -fPIC -Wall -Wno-unused-parameter -fno-implicit-templates -fno-exce
ptions -fno-rtti -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1′ LDFLAGS=” ASFLAGS=”
LIBC:

[hr]
4、PHP,可以通过 -i 参数可以打印PHP全局变量和安装信息

/usr/bin/php -i | grep configure

Configure Command => ‘./configure’ ‘–prefix=/usr/local/php/’ ‘–enable-fpm’ ‘–enable-opcache’ ‘–enable-inline-optimization’ ‘–with-libxml-dir=/usr/local/libxml2/’ ‘–with-curl=/usr/local/curl/’ ‘–enable-dba’ ‘–with-gd’ ‘–enable-gd-native-ttf’ ‘–enable-gd-jis-conv’ ‘–with-jpeg-dir=/usr/local/jpeg/’ ‘–with-png-dir=/usr/local/libpng/’ ‘–with-zlib-dir=/usr/local/zlib/’ ‘–with-freetype-dir=/usr/local/freetype/’ ‘–with-pcre-regex=/usr/local/pcre/’ ‘–with-pcre-jit’ ‘–with-pcre-dir=/usr/local/pcre/’ ‘–enable-mbstring’ ‘–enable-pcntl’ ‘–enable-soap’ ‘–enable-shmop’ ‘–enable-sockets’ ‘–enable-sysvsem’ ‘–enable-zip’ ‘–enable-mysqlnd’ ‘–with-mysqli=mysqlnd’ ‘–with-pdo-mysql=mysqlnd’

最新文章

Return Top