zoukankan      html  css  js  c++  java
  • nginx+phpfpm+mysql 高性能环境搭建

    首先下载nginx,pcre,

    首先安装pcre  

    [xxxxx@xxxxx.com]#tar zxvf pcre-7.2.tar.gz
    [xxxxx@xxxxx.com]#cd pcre-7.2/
    [xxxxx@xxxxx.com]#./configure
    [xxxxx@xxxxx.com]#make && make install
    [xxxxx@xxxxx.com]#cd ../

    libtool: line 990: g++: command not found 

    运行 apt-get install build-essential解决

    编译nginx

    ./configure –user=root –group=root –prefix=/home/admin/nginx –with-openssl=/usr/include/openssl –with-pcre=/usr/local/lib –with-http_stub_status_module

    在这里,需要说明一下,由于Nginx的配置文件中我想用到正则,所以需要 pcre 模块的支持。上面安装步骤里我已经安装了 pcre 及 pcre-devel 的rpm包,但是 Ngxin 并不能正确找到 .h/.so/.a/.la 文件,因此我稍微变通了一下:

    [xxxxx@xxxxx.com]#mkdir /usr/include/pcre/.libs/
    [xxxxx@xxxxx.com]#cp /usr/local/lib/libpcre.a /usr/include/pcre/.libs/libpcre.a
    [xxxxx@xxxxx.com]#cp /usr/local/lib/libpcre.a /usr/include/pcre/.libs/libpcre.la
    [xxxxx@xxxxx.com]#cp /usr/local/lib/libpcre.a /usr/include/pcre/libpcre.a
    [xxxxx@xxxxx.com]#cp /usr/local/lib/libpcre.a /usr/include/pcre/libpcre.la
    然后,修改 objs/Makefile 大概在908行的位置上,注释掉以下内容:

    ./configure –disable-shared

    接下来,就可以正常执行 make 及 make install 了。

  • 相关阅读:
    (七)linux 学习 -- 键盘高级操作技巧
    (六)linux 学习 -- 从 shell 眼中看世界
    (五)linux 学习 --重定向
    (四)linux 学习 --使用命令
    (三)linux 学习 --操作文件和目录
    JavaScript封装好的方法
    覆盖Html5默认样式
    CSS的布局整理
    Vue学习笔记
    博客园添加和隐藏导航菜单
  • 原文地址:https://www.cnblogs.com/mashuaimama/p/2442686.html
Copyright © 2011-2022 走看看