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

17 篇文章 0 订阅
       对于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 configure
CONFIGURE_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 configure
Configure 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版本号



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值