當前位置:
首頁 > 最新 > Linux查看Nginx、Apache、MySQL、PHP的編譯參數

Linux查看Nginx、Apache、MySQL、PHP的編譯參數

軟體安裝好了,想查看當初編譯時的參數,怎麼搞?

1、Nginx,可以通過 -V 參數查看Nginx版本及編譯參數

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

2、Apache,編譯參數存放在 apache 的 config.nice 文件,前提時,沒有做過 make clean

#! /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"

"$@"

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

...

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:

...

...

4、PHP,可以通過 -i 參數可以列印PHP全局變數和安裝信息

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"

喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 全球大搜羅 的精彩文章:

【吐槽電影】祖宗十九代
「不結婚,真的會死嗎?」

TAG:全球大搜羅 |