Check the compilation parameters of nginx apache mysql php under Linux
Due to the need of work, sometimes you need to debug in an environment that you are not involved in compiling, so you need to know the compilation parameters of nginx,apache,mysql,php. The following tips can quickly let you know the compilation parameters in the default server.
Quickly view the compilation parameters of the server software:
1. Nginx compilation parameters:
Your_nginx_dir/sbin/nginx-v
2. Apache compilation parameters:
Cat your_apache_dir/build/config.nice
3. Php compilation parameters:
Your_php_dir/bin/php-I | grep configure
4. Mysql compilation parameters:
Cat your_mysql_dir/bin/mysqlbug | grep configure
The following is a complete practical example:
Check the compilation parameters for getting nginx:
The copy code is as follows:
[root@www] # / usr/local/nginx/sbin/nginx-V
Nginx: nginx version: nginx/1.0.8
Nginx: built by gcc 4.3.2 (Debian 4.3.2-1.1)
Nginx: configure arguments:-user=www-data-group=www-data-prefix=/usr/local/nginx-with-http_stub_status_module-with-http_gzip_static_module
Check the compilation parameters for getting apache:
The copy code is as follows:
[root@www ~] # cat / usr/local/apache2/build/config.nice
#! / bin/sh
#
# Created by configure
". / configure"\
"- prefix=/usr/local/apache2"\
"- enable-so"\
"- enable-modules=all"\
"- enable-mods-shared=all"\
"- enable-layout=Apache"\
"- enable-ssl=static"\
"- with-ssl=/usr/local/openssl"\
"- enable-rewrite"\
"- enable-suexec"\
"- with-suexec-logfile=/www/logs/suexec.log"\
"- with-suexec-uidmin=500"\
"- with-suexec-gidmin=100"\
"- with-suexec-caller=nobody"\
"- with-suexec-docroot=/www"\
Check the compilation parameters for getting mysql:
The copy code is as follows: [root@www ~] # grep configure / usr/local/mysql/bin/mysqlbug
# This is set by configure
CONFIGURE_LINE= ". / configure'- prefix=/usr/local/mysql4''- sysconfdir=/etc''- enable-assembler''- without-debug''- with-client-ldflags=-all-static''- with-mysqld-ldflags=-all-static''- localstatedir=/www/mysql' http://www.bbqmw.net/qm_bbqmbd/'- with-big-tables''- with-low-memory''- with-extra-charsets=all''- enable-thread -safe-client''- with-pthread''- with-unix-socket-path=/tmp/mysql.sock' "
See getting the compilation parameters of php:
The copy code is as follows:
[root@www ~] # / usr/local/php5/bin/php-I | grep configure
Configure Command = >'. / configure''- prefix=/usr/local/php5''- enable-exif''- enable-mbstring''- with-iconv''- with-curl=/usr''- with-gdbm''- with-gettext''- enable-calendar''- enable-magic-quotes''- enable-wddx''- enable-ftp''- enable-inline-optimization''- with-gd=/usr/local''- with-zlib' '- enable-gd-native-ttf''-with-t1lib=/usr/local''- with-zlib-dir=/usr''- with-ttf''- with-freetype-dir=/usr''- with-gd''- with-png-dir=/usr''- with-jpeg-dir=/usr''- with-mysql=/usr/local/mysql4''- enable-force-cgi-redirect''- with-apxs2=/usr/local/apache2/bin/apxs ''-with-pdo-mysql=/usr/local/mysql4''- enable-sockets''- with-openssl=/usr/local/openssl'