Linux下,对于LAMP组合,怎么查看安装时的编译参数

来源:互联网 发布:淘宝优惠券领取地址 编辑:程序博客网 时间:2024/06/11 05:52
       对于web开发,LAMP应该是经常要安装的东东了。由于服务器扩展,常常需要相同编译设置进行扩展。可由于时间久远,编译参数也许早就忘了,没关系。这里介绍一种简单的查看编译参数的方法。

       对于apache服务器,假设安装目录:/usr/local/apache 

[root@dbmaster2 apache]# cd /usr/local/apache/[root@dbmaster2 apache]# cd build/[root@dbmaster2 build]# cat config.nice 

       通过上面几步操作,如果幸运的话,你应该看到类似下面的结果:

[root@dbmaster2 build]# cat config.nice #! /bin/sh## Created by configure"./configure" \"--prefix=/usr/local/apache" \"--enable-so" \"--enable-rewrite" \"--enable-cgi" \"--enable-vhost-alias" \"--enable-ssl" \"--enable-cache" \"--enable-mem-cache" \"$@"

        好了,apache的已经搞定。下面来看看mysql的吧!假如你的mysql目录为:/usr/local/mysql

[root@localhost bin]$ cd /usr/local/mysql/[root@localhost mysql]$ cd bin/[root@localhost bin]$ cat mysqlbug | grep configure
       通过上面操作,可以看到类似如下结果:    
[root@localhost bin]$ cat mysqlbug | grep configure# This is set by configureCONFIGURE_LINE="./configure  '--prefix=/usr/local/mysql' '--localstatedir=/usr/local/mysql/data' '--libexecdir=/usr/local/mysql/bin' '--with-comment=MySQL Community Server (GPL)' '--with-server-suffix=' '--enable-thread-safe-client' '--enable-local-infile' '--with-pic' '--with-fast-mutexes' '--with-client-ldflags=-static' '--with-mysqld-ldflags=-static' '--with-zlib-dir=bundled' '--with-big-tables' '--with-ssl' '--with-readline' '--with-embedded-server' '--with-partition' '--with-innodb' '--without-ndbcluster' '--with-archive-storage-engine' '--with-blackhole-storage-engine' '--with-csv-storage-engine' '--without-example-storage-engine' '--with-federated-storage-engine' '--with-extra-charsets=complex' 'CC=ccache /usr/local/gcc-4.3.2/bin/gcc -static-libgcc' 'CFLAGS=-g -O3' 'CXX=ccache /usr/local/gcc-4.3.2/bin/gcc -static-libgcc' 'CXXFLAGS=-g -O3'"
         假设php目录为:/usr/local/php

[root@localhost build]# cd /usr/local/php/[root@localhost php]# cd bin/[root@localhost bin]# ./php -i | grep configureConfigure Command =>  './configure'  '--prefix=/usr/local/php' '--enable-fastcgi' '--enable-force-cgi-redirect' '--with-mysql=/opt/mysql' '--enable-sockets' '--with-mime-magic' '--enable-mbstring' '--with-iconv' '--with-ttf' '--enable-ftp' '--with-curl' '--with-bz2' '--enable-calendar'
         通过上面的方法,apache,mysql和php编译参数都搞定了。

        如果你想查看nginx的编译参数信息,请参阅以前的一篇blog:查看服务器上安装的nginx版本号



原创粉丝点击