查看nginx编译参数:
#/usr/local/nginx/sbin/nginx -V
 
查看mysql编译参数:
cat /usr/local/mysql/bin/mysqlbug | grep CONFIGURE_LINE

查看apache编译参数:
cat $apachehome$/build/config.nice

查看php编译参数:
$PHP$/bin/php -i | grep configure

本文出自 “ohgenlong16300blog.com” 博客,请务必保留此出处http://ohgenlong16300.blog.51cto.com/499130/846075

轻松获取LAMP,LNMP环境编译参数配置

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://oldboy.blog.51cto.com/2561410/929333

大家是否遇到过去了新公司,公司内的LAMP,LNMP等所有的环境都是配置好的(已经在提供服务了),公司又没有留下部署文档,甚至安装LAMP,LAMP等环境的人已经和你交接完离职了,那么线上服务器(lamp,lnmp)的编译环境等就成了黑盒,如果不改造还好,当服务器需要迁移改造时,我们(新手的你)没有老的环境编译情况,就会很郁闷,生怕编译错了影响线上程序运行。
    其实,很多时候,是可以看到软件的编译的情况的,下面老男孩就以lamp,lnmp环境为例为大家一一道来。

1)查看web服务的编译参数
  a.查看nginx的编译参数:
   /home/oldboy/run/nginx/sbin/nginx -V
 范例1:

  1. [root@VM-001 ~]# /home/oldboy/run/nginx/sbin/nginx -V
  2. nginx version: nginx/0.8.50
  3. built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  4. configure arguments: --prefix=/app/nginx

提示:/home/oldboy/run/为普通用户起的nginx服务命令路径 
b.查看apache的编译参数:
    cat /home/oldboy/run/apache/build/config.nice
 范例2:

  1. [root@VM-002 ~]# cat /home/oldboy/run/apache/build/config.nice
  2. #! /bin/sh
  3. #
  4. # Created by configure
  5. "./configure" \
  6. "--prefix=/app/apache2.2.9" \
  7. "--enable-deflate" \
  8. "--enable-headers" \
  9. "--enable-modules=so" \
  10. "--enable-so" \
  11. "--with-mpm=worker" \
  12. "--enable-rewrite" \
  13. "--enable-cgi" \
  14. "$@"

  提示:/home/oldboy/run/为普通用户起的apache服务命令路径

2)查看MySQL数据库的编译参数:
grep CONFIGURE_LINE /app/mysql/bin/mysqlbug
 提示:还发现很多人先cat,在grep,很不专业,应杜绝。
 范例3:

  1. [root@VM-001~]# grep CONFIGURE_LINE /app/mysql/bin/mysqlbug  
  2. CONFIGURE_LINE="./configure '--prefix=/app/mysql/' '--enable-assembler' '--with-extra-charsets=complex' '--enable-thread-safe-client' '--with-big-tables' '--with-readline' '--with-ssl' '--with-embedded-server' '--enable-local-infile' '--with-plugins=partition,innobase' '--with-plugin-PLUGIN'"
  3. `test -n "$CONFIGURE_LINE"  && echo "Configure command: $CONFIGURE_LINE"`

  提示:/app为mysql服务安装路径
3)查看php编译参数:
/app/php/bin/php -i|grep configure
 范例4:

  1. [root@VM-001 ~]# /app/php/bin/php -i|grep configure
  2. Configure Command =>  './configure'  '--prefix=/app/php' '--with-apxs2=/app/apache/bin/apxs' '--with-mysql=shared,/app/mysql' '--with-ttf=shared' '--with-freetype-dir' '--with-gd' '--with-zlib' '--with-jpeg-dir' '--with-png-dir' '--with-iconv=/app/libiconv' '--enable-short-tags' '--enable-sockets' '--enable-zend-multibyte' '--enable-soap' '--with-openssl' '--enable-mbstring' '--enable-static' '--enable-gd-native-ttf' '--with-curl' '--with-xsl' '--enable-ftp' '--with-libxml-dir'

提示:/app为php服务安装路径
本文得益于智君同学的http://ohgenlong16300.blog.51cto.com/499130/846075文章才有的分享!

本文出自 “老男孩linux培训” 博客,请务必保留此出处http://oldboy.blog.51cto.com/2561410/929333

查看mysql,apache,php,nginx编译参数的更多相关文章

  1. 查看mysql apache php nginx的编译参数

    查看mysql编译参数: cat /usr/local/mysql/bin/mysqlbug|grep configure 查看apache编译参数: cat /usr/local/apache2/b ...

  2. 查看 apache、nginx、php、mysql 的编译参数

    查看nginx编译参数:/usr/local/nginx/sbin/nginx -V 查看apache编译参数:cat /usr/local/apache2/build/config.nice 查看m ...

  3. 查看Nginx、apache、MySQL和PHP的编译参数

    1.nginx编译参数:#/usr/local/nginx/sbin/nginx -V2.apache编译参数:# cat /usr/local/apache/build/config.nice3.p ...

  4. 如何查看已经安装的nginx、apache、mysql和php的编译参数

    1.nginx编译参数: nginx -V(大写) #注意:需保证nginx在环境变量中,或者使用这样的形式:/user/local/nginx/sbin/nginx -V 2.apache编译参数 ...

  5. apache、nginx、php、mysql 编译参数查询

    nginx编译参数查看:/usr/local/nginx/sbin/nginx -V apache编译参数查看:cat /usr/local/apache2/build/config.nice mys ...

  6. Zabbix 监控MySQL、Apache、Nginx应用监控

    zabbix对第三方应用软件的监控,主要有两个工作难点,一个是编写自定义监控脚本,另一个是在编写模板并导入zabbix web中,编写脚本这个要根据 监控需求定制即可,而编写模板文件有些难度,不过网上 ...

  7. Linux下查看mysql、apache是否安装,安装,卸载等操作

    Linux下查看mysql.apache是否安装,并卸载. 指令 ps -ef|grep mysql 得出结果 root               ?        :: /bin/sh /usr/ ...

  8. linux下如何查看mysql、apache是否安装,并卸载

    --linux下如何查看mysql.apache是否安装,并卸载? http://blog.163.com/dengxiuhua126@126/blog/static/1186077720137311 ...

  9. LAMP第一部分安装mysql -apache -php

    1. 安装mysqlcd /usr/local/src/ 免安装编译二进制的包wget http://syslab.comsenz.com/downloads/linux/mysql-5.1.40-l ...

随机推荐

  1. web.xml中openEntityManagerInViewFilter的作用(转)

    <filter> <filter-name>openEntityManagerInViewFilter</filter-name> <filter-class ...

  2. MUI(4)

    今天感觉无聊,想听一首音乐.没有添加其他页面,只是在index_list.html页面进行代码添加而已. <!doctype html> <html> <head> ...

  3. python 函数小实例

    1.判断一个数字是否为素数: import math # -----------------判断一个数是否是素数------------------ def sushu(a): i=1 for i i ...

  4. redis事务详解

    mysql中也存在事务的概念.其实事务的定义是一样的.一组操作的集合,作为一个整体,要么全执行,要么全不执行. redis设置事务三步骤: 开始事务 :multi 操作加入事务队列 执行事务 :exe ...

  5. java8中的map和reduce

    java8中的map和reduce 标签: java8函数式mapreduce 2014-06-19 19:14 10330人阅读 评论(4) 收藏 举报  分类: java(47)  FP(2)  ...

  6. Fiddler (五) Mac下使用Fiddler

      Fiddler是用C#开发的.  所以Fiddler不能在Mac系统中运行.  没办法直接用Fiddler来截获MAC系统中的HTTP/HTTPS,    Mac 用户怎么办呢? Fiddler可 ...

  7. mysql 5.7.17发布

    Mysql 5.7.17发布了,主要修复: Changes in MySQL 5.7.17 (2016-12-12, General Availability) Compilation Notes M ...

  8. mysql 5.6启用强密码

    mysql的密码策略通过插件的方式进行检查,插件的名称是validate_password,可通过如下方式安装: mysql> INSTALL PLUGIN validate_password ...

  9. 【转】MySQL的Replace into 与Insert into on duplicate key update真正的不同之处

    原文链接:http://www.jb51.net/article/47090.htm   今天听同事介绍oracle到mysql的数据migration,他用了Insert into ..... on ...

  10. Windows安装apache2.4

    The primary Windows platform for running Apache 2.4 is Windows 2000 or later. Always obtain and inst ...