博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
轻松获取LAMP,LNMP环境编译参数配置
阅读量:6906 次
发布时间:2019-06-27

本文共 2082 字,大约阅读时间需要 6 分钟。

    大家是否遇到过去了新公司,公司内的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.  
  6. "./configure" \  
  7. "--prefix=/app/apache2.2.9" \  
  8. "--enable-deflate" \  
  9. "--enable-headers" \  
  10. "--enable-modules=so" \  
  11. "--enable-so" \  
  12. "--with-mpm=worker" \  
  13. "--enable-rewrite" \  
  14. "--enable-cgi" \  
  15. "$@" 

  提示:/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://uardl.baihongyu.com/

你可能感兴趣的文章
GitHub具体教程
查看>>
Hbase配置java客户端
查看>>
VC皮肤库SkinSharp 1.0.6.6的使用
查看>>
mysql分表方法-----MRG_MyISAM引擎分表法
查看>>
线程间的通信
查看>>
PageRank算法
查看>>
strerror() 和perror()函数
查看>>
C# BackgroundWorker的使用
查看>>
微软职位内部推荐-SENIOR SOFTWARE ENGINEER
查看>>
实时刷新winform中的某一个控件上的文字
查看>>
八大排序算法总结
查看>>
[转]移动App测试中的最佳做法
查看>>
WebStorm 9 注册码
查看>>
Oracle终极数据恢复,孰弱孰强(DUL vs AUL)
查看>>
Linux 删除文件中某一行的方法
查看>>
搞不懂为什么开发人员爱iOS恨Android?
查看>>
跟着鬼哥学so改动,一,准备篇
查看>>
【转】vim环境设置和自动对齐
查看>>
火星人是护法天使、科普神童
查看>>
接收消息----接收事件推送
查看>>