1.下载解压

wget http://au1.php.net/get/php-5.5.1.tar.gz/from/ch2.php.net/mirror

tar zxvf php-5.5.1.tar.gz

cd php-5.5.1

2.编译,安装

./configure --prefix=/usr/local/php --exec-prefix=/usr/bin --bindir=/usr/bin --sbindir=/usr/sbin --with-libxml-dir=/usr/lib --enable-zip --with-mysql --with-mysqli=/usr/bin/mysql_config --with-jpeg-dir=/usr/lib --enable-exif --with-gd --enable-soap --enable-sockets --enable-mbstring --with-freetype-dir --enable-mbstring=all --enable-mbregex --with-zlib --with-bz2 --enable-calendar --with-iconv --with-mcrypt=/usr/local/lib --enable-pdo --with-pdo-mysql --with-gettext --with-curl --with-pdo-mysql --with-openssl --with-mysql-sock --enable-gd-native-ttf --enable-fpm

make && make install

3.配置

  3.1:nginx.conf

    user apache apache;
    worker_processes 1;

    error_log /var/log/nginx/error.log warn;
    pid /var/run/nginx.pid;

    events {

      use   epoll; 
      worker_connections 1024;
    }

    http {
      include /etc/nginx/mime.types;
      default_type application/octet-stream;

      log_format main '$remote_addr - $remote_user [$time_local] "$request" '
               '$status $body_bytes_sent "$http_referer" '
               '"$http_user_agent" "$http_x_forwarded_for"';

      access_log /var/log/nginx/access.log main;

      sendfile on;
      #tcp_nopush on;

      keepalive_timeout 65;

      #gzip on;

      include /etc/nginx/conf.d/*.conf;
    }

    3.2 test2.conf 在 /etc/nginx/conf.d目录下

    server {
      listen 80;
      server_name test2.com;

      #charset koi8-r;
      access_log /var/log/nginx/log/test2.com.access.log main;

      location / {
        root /var/www/cdm;
        index index.php index.html index.htm;
      }

      #error_page 404 /404.html;

      # redirect server error pages to the static page /50x.html
      #
      error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        root /usr/share/nginx/html;
      }

      # proxy the PHP scripts to Apache listening on 127.0.0.1:80
      #
      #location ~ \.php$ {
      # proxy_pass http://127.0.0.1;
      #}

      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
      #
      location ~ \.php$ {
        root /var/www/cdm;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /var/www/cdm$fastcgi_script_name;
        include fastcgi_params;
      }

      # deny access to .htaccess files, if Apache's document root
      # concurs with nginx's one
      #
      #location ~ /\.ht {
        # deny all;
      #}
    }

注:如果提示mysql、libmcrypt或错误,一般是依赖库未安装,或没有正确指定安装位置。

请确认是否安装,如果已经安装,指定具体位置即可

未安装则先安装。

在配置时需要注意权限的设置还有 root 位置的指定,特别是 fastcgi_param SCRIPT_FILENAME /var/www/cdm$fastcgi_script_name; 这一行,SCRIPT_FILENAME 需要指定具体的路径。

这是最基本的配置,并没有做具体的优化。

php 5.5.1 编译安装过程的更多相关文章

  1. 转-httpd 2.4.4 + mysql-5.5.28 + php-5.4.13编译安装过程

    一.编译安装apache 1.解决依赖关系 httpd-2.4.4需要较新版本的apr和apr-util,因此需要事先对其进行升级.升级方式有两种,一种是通过源代码编译安装,一种是直接升级rpm包.这 ...

  2. Mapnik 编译安装过程

    首先总结一下,Linux(windows上没有测试过)上Mapnik的编译与测试就是一部心酸血泪史呀,如果您没有做好思想准备,那就出门左转,看点有意思的去吧,编译这个太煎熬了. 安装PostgreSQ ...

  3. LAMP环境源码编译安装过程

    LAMP环境源码编译安装过程 一.Apache的安装 1.1.apache软件包及依赖包准备 httpd-2.4.29.tar.bz2       apr-1.6.3.tar.gz      apr- ...

  4. mysql5.5编译安装过程(自己总结)

    一,安装过程 //创建mysql安装目录,创建数据存放目录,创建用户和用户组与赋予数据存放目录权限 mkdir -p /usr/local/mysql/ mkdir -p /data/mysql/ g ...

  5. php编译安装过程中遇到问题

    编译安装PHP时遇到的问题 问题1: configure: error: xml2-config not found. Please check your libxml2 installation. ...

  6. LAMP架构编译安装过程详解

    linux Git 安装 1.安装git依赖包 . yum install -y perl-ExtUtils-MakeMaker package . yum install -y tcl build- ...

  7. R 在linux redhat 6.5的编译安装过程

    下载源码包 在http://cran.r-project.org/mirrors.html,选择一个国内镜像下载需要的版本,比如:http://mirror.lzu.edu.cn/CRAN/src/b ...

  8. mtd-utils编译安装过程

    git clone git://git.infradead.org/mtd-utils.git cd mtd-utils apt install -y libssl-dev libzlb libzst ...

  9. 不要着急改代码,先想想--centos 6.8下编译安装tmux

    诸位读者新年好,2017开年第一篇博客,请允许我先问候一下看到这篇博客的诸位.写博客是我2017年定下的目标之一,希望我会坚持下去. 最近打算尝试一下tmux这个神器,于是有了这一篇关于思维方式的Bl ...

随机推荐

  1. loutsScript 常用代码

    1.FTSearch搜索: Set dc=db.Ftsearch("name",0) '0位置为最大的查询数,0为所有匹配的文件 FTSearch必须创建数据库索引 Set doc ...

  2. Nginx模块学习之————accesskey权限模块使用(简单的m3u8防盗链)

    配置文件:http://www.cnblogs.com/tinywan/p/5983694.html 通过加密后的文件: 正确地址:curl -i http://访问的IP地址(这里是直播节点IP地址 ...

  3. mysql概要(十二)事务

    1.特性 2.开启结束取消事务:需要选择支持事务的引擎 3,隐式提交事务: 4.事务的隔离级别:

  4. Win7x64_chromeX86_相关路径

    1. C:\Users\33\AppData\Local\Google 里面有2个文件夹:“Chrome”.“CrashReports” 2. C:\Program Files (x86)\Googl ...

  5. Codeforces 713D Animals and Puzzle

    题意:一个n*m的01矩阵,Q个询问,每次询问一个矩形区域内,最大的全1正方形的边长是多少? 题解:dp[0][0][i][j]表示以(i, j)为右下角的正方形的最长边长.RMQ后,二分答案即可. ...

  6. select实现输入模糊匹配与选择双重功能

    下载jqueryUI插件 引入 <link rel="stylesheet" type="text/css" href="/js/jquery/ ...

  7. git使用技巧

    git使用技巧 转载自:http://172.17.144.8/iceway.zhang/shares/201604/201604_git_tips.md.html 我们在工作中几乎每天都会用到git ...

  8. Javascript模块化编程(一):模块的写法 (转载 学习中。。。。)

    转载地址:http://www.ruanyifeng.com/blog/2012/10/javascript_module.html 阮一峰 大神:http://www.ruanyifeng.com/ ...

  9. 转:copy initialization

    转自: http://en.cppreference.com/w/cpp/language/copy_initialization copy initialization   C++   C++ la ...

  10. 转:C++语言的15个晦涩特性

    转自 http://blog.jobbole.com/54140/ 操作符重载和检查顺序 重载,(逗号),||或者&&操作符会引起混乱,因为它打破了正常的检查规则.通常情况下,逗号操作 ...