• 1
  • 2
  • 3
  • 4
  • 5
阿里云主机ECS 首 页  »  帮助中心  »  云服务器  »  阿里云主机ECS
ECS Linux系统查看web环境编译参数的具体方法
发布日期:2015-12-23 11:12:43

  若web服务通过编译方式安装,需了解当前的编译参数从而对现有环境升级,可通过下面的方式来查看。

  apache可查看config.nice文件:

  [root@test sh]# cat /alidata/server/httpd-2.2.22/build/config.nice

  #! /bin/sh

  #

  # Created by configure

  "./configure" \

  "--prefix=/alidata/server/httpd" \

  "--with-mpm=worker" \

  "--enable-so" \

  "--enable-rewrite" \

  "--enable-mods-shared=all" \

  "--enable-deflate" \

  "--enable-cache" \

  "--enable-disk-cache" \

  "--enable-mem-cache" \

  "--enable-file-cache" \

  "$@"

  nginx可以执行-V参数:

  [root@test sh]# /alidata/server/nginx/sbin/nginx -V

  nginx version: nginx/1.4.4

  built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

  TLS SNI support enabled

  configure arguments: --user=www --group=www --prefix=/alidata/server/nginx --with-http_stub_status_module --without-http-cache --with-http_ssl_module --with-http_gzip_static_module

  php可以执行-i参数再grep过滤config关键词:

  [root@test sh]# /alidata/server/php-5.5.7/bin/php -i|grep config

  Configure Command => './configure' '--prefix=/alidata/server/php' '--enable-opcache' '--with-config-file-path=/alidata/server/php/etc' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--enable-fpm' '--enable-fastcgi' '--enable-static' '--enable-inline-optimization' '--enable-sockets' '--enable-wddx' '--enable-zip' '--enable-calendar' '--enable-bcmath' '--enable-soap' '--with-zlib' '--with-iconv' '--with-gd' '--with-xmlrpc' '--enable-mbstring' '--without-sqlite' '--with-curl' '--enable-ftp' '--with-mcrypt' '--with-freetype-dir=/usr/local/freetype.2.1.10' '--with-jpeg-dir=/usr/local/jpeg.6' '--with-png-dir=/usr/local/libpng.1.2.50' '--disable-ipv6' '--disable-debug' '--with-openssl' '--disable-maintainer-zts' '--disable-safe-mode' '--disable-fileinfo'

  mysql可以查看mysqlbug并grep过滤CONFIGURE_LINE关键词:

  [root@test sh]# grep CONFIGURE_LINE /alidata/server/mysql-5.1.57/bin/mysqlbug

  CONFIGURE_LINE="./configure '--prefix=/alidata/server/mysql' '--with-charset=utf8' '--with-extra-charsets=all' '--enable-thread-safe-client' '--with-big-tables' '--with-ssl' '--with-embedded-server' '--with-plugins=innobase,partition' '--with-mysqld-ldflags=-all-static' '--with-client-ldflags=-all-static'"

  请注意:因为是编译安装,上述命令的路径各自不一样,与各自实际web的路径相关。