大家是否遇到过去了新公司,公司内的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服务安装路径

查看nginx编译安装的更多相关文章

  1. nginx编译安装新模块

    nginx的模块是需要重新编译nginx,而不是像apache一样配置文件引用.so 这里以安装第三方ngx_http_google_filter_module模块为例 下载第三方扩展模块ngx_ht ...

  2. Nginx编译安装模块(非重装)

    假如原已经安装好的Nginx,现在需要添加一个未被编译安装的ssl模块,我们该怎么办呢?重装,还是有其他的办法?当然不需要重装的,下面我们看下如何实现的. 1.cd到Nginx解压过后的目录[root ...

  3. nginx编译安装

    Nginx编译安装 1.nginx官网:http://wiki.nginx.org/Install下载:http://nginx.org/en/download.html 2.编译安装# wget h ...

  4. LNMP平台搭建之一:nginx编译安装

    参考博客:https://www.cnblogs.com/zhang-shijie/p/5294162.html   jack.zhang 一.环境说明 系统环境:centos6.5 [root@lo ...

  5. Nginx编译安装lua-nginx-module

    lua-nginx-module 模块可以将Lua的强大功能嵌入NGINX服务器. 下载Nginx源码 如果已安装Nginx,需要查看当前安装版本的编译参数: $ /usr/local/nginx/s ...

  6. [nginx]编译安装及安全优化

    nginx配置-最后整理版 nginx_upstream_check_module nginx-module-vts nginx打补丁 nginx编译安装 - 下载 cd /usr/local/src ...

  7. Nginx编译安装第三方模块http_substitutions_filter_module2222

    Nginx编译安装第三方模块http_substitutions_filter_module Rming -- 阅读 安装 Http 编译 module filter nginx 模块 >> ...

  8. Nginx编译安装第三方模块http_substitutions_filter_module

    Nginx编译安装第三方模块http_substitutions_filter_module 分类:服务器技术  作者:rming  时间:-- . >>ngx_http_substitu ...

  9. Nginx编译安装及常用命令

    一个执着于技术的公众号 前言 前面我们已经了解Nginx基础入门知识,今天就带大家一起学习下Nginx编译安装部署 准备工作 一台linux机器(本次实验以CentOS 7.5为例) 到Nginx官方 ...

随机推荐

  1. linux下mysql的root密码忘记解决方

    1.首先确认服务器出于安全的状态,也就是没有人能够任意地连接MySQL数据库. 因为在重新设置MySQL的root密码的期间,MySQL数据库完全出于没有密码保护的 状态下,其他的用户也可以任意地登录 ...

  2. Maintainable HashCode and Equals Using Apache Commons

    Java hashCode and equals methods can be tricky to implement correctly. Fortunately, all majors IDEs ...

  3. Android 动画的重复播放

    如果你要的加载xml方式设置动画,而且在xml定义了好几个动画元素比如:<set>    <alpha android:repeatCount="-1" andr ...

  4. PKUSC 模拟赛 day2 下午总结

    终于考完了,下午身体状况很不好,看来要锻炼身体了,不然以后ACM没准比赛到一半我就挂掉了 下午差点AK,有一道很简单的题我看错题面了所以没有A掉 第一题显然是非常丝薄的题目 我们很容易通过DP来O(n ...

  5. lintcode:合并区间

    题目: 合并区间 给出若干闭合区间,合并所有重叠的部分. 样例 给出的区间列表 => 合并后的区间列表: [ [ [1, 3], [1, 6], [2, 6], => [8, 10], [ ...

  6. LR_问题_在导入wsdl时出现parsing error

    问题描述:使用LR录制webservice协议的脚本,在导入wsdl时出现parsing error,详见图 问题解决:在导入wsdl时输入的地址错误,只指定了地址的虚拟目录名称,未指定方法名称,应该 ...

  7. Hibernate逍遥游记-第10章 映射继承关系-003继承关系树中的每个类对应一个表(joined-subclass)

    1. 2. <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate ...

  8. Photoshop:制作金属质感-不锈钢纹理

    效果图 过程: 1.滤镜->渲染->云彩 2.滤镜->模糊->高斯模糊 3.滤镜->杂色->添加杂色 ,数量10 4.滤镜->模糊->径向模糊 5.滤镜 ...

  9. c语言中static的用法

    1.static定义变量: 1).局部: a.静态局部变量在函数内部定义,生存期为整个源代码,但作用域与自动变量相同,只能在定义的函数里面使用.退出该函数后,虽然此变量还存在内存中,但不能使用. b. ...

  10. Ossec常用命令

    启动并查看httpd服务 systemctl start httpd systemctl status httpd.service 启动并查看mysql服务 systemctl start maria ...