源码安装php

cat /etc/redhat-release
uname -rm
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum install -y zlib-devel libxml2-devel libjpeg-turbo-devel \
freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel \
openssl-devel libmcrypt-devel
mkdir /server/tools -p
cd /server/tools
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz 或者 wget http://60.205.224.143/source/libiconv-1.15.tar.gz
tar -xf libiconv-1.15.tar.gz
cd libiconv-1.15
./configure --prefix=/usr/local/libiconv-1.15
make
make install
ln -s /usr/local/libiconv-1.15 /usr/local/libiconv
rpm -qa zlib-devel libxml2-devel libjpeg-turbo-devel libmcrypt-devel \
freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel openssl-devel
cd ..
wget http://mirrors.sohu.com/php/php-5.3.27.tar.gz
tar xf php-5.3.27.tar.gz
cd php-5.3.27 ./configure \
--prefix=/application/php-5.3.27 \
--with-mysql=mysqlnd \
--with-iconv-dir=/usr/local/libiconv \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-safe-mode \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--with-curlwrappers \
--enable-mbregex \
--enable-fpm \
--enable-mbstring \
--with-mcrypt \
--with-gd \
--enable-gd-native-ttf \
--with-openssl \
--with-mhash \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--enable-short-tags \
--enable-zend-multibyte \
--enable-static \
--with-xsl \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--enable-ftp #--with-mysql=mysqlnd 此参数表示使用php自带的mysql客户端 make
make install
ln -s /application/php-5.3.27/ /application/php
cp php.ini-production /application/php/lib/php.ini
cd /application/php/etc/
cp php-fpm.conf.default php-fpm.conf
/application/php/sbin/php-fpm
ps -ef | grep php-fpm
lsof -i :9000

配置nginx fastcgi模块

vim /application/nginx/conf/extra/www.conf

server {
listen 80;
server_name www.peterwang.com;
root html/www;
index index.php index.html index.htm;
error_page 500 502 503 504 /50x.html;
access_log logs/access_www.log main;
location / { }
location ~.*\.(php|php5)?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
} /application/nginx/sbin/nginx -t
/application/nginx/sbin/nginx -s reload
cd /application/nginx/html/www
echo "<?php phpinfo(); ?>" > test_info.php
cat test_info.php
#打开浏览器,输入http://10.0.0.8/test_info.php

PHP-5.3.27源码安装及nginx-fastcgi配置的更多相关文章

  1. Nginx源码安装及调优配置

    导读 由于Nginx本身的一些优点,轻量,开源,易用,越来越多的公司使用nginx作为自己公司的web应用服务器,本文详细介绍nginx源码安装的同时并对nginx进行优化配置. Nginx编译前的优 ...

  2. 源码安装python +NGINX 的坎坷路 +uwsgi安装 部署django 的CRM项目

    一.Nginx安装(基于ubuntu17.10 版本) 首先我们是基于源码安装,主要有如下步骤 1.安装依赖包 1.安装gcc g++的依赖库 sudo apt-get install build-e ...

  3. Nginx源码安装及调优配置(转)

      导读 由于Nginx本身的一些优点,轻量,开源,易用,越来越多的公司使用nginx作为自己公司的web应用服务器,本文详细介绍nginx源码安装的同时并对nginx进行优化配置. Nginx编译前 ...

  4. mysql-5.6.27源码安装及错误解决办法

    wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.27.tar.gz yum install -y cmake  当然也可以自己下载源码包安 ...

  5. linux篇-linux mysql5.6.27源码安装和错误解决

    centos mysql5.6.27 1编译安装 先进入到文件放置的路径下 创建一个个文件 #mkdir–p /data/mysql/mysql #mkdir–p /data/mysql/mysqld ...

  6. salt源码安装软件和yum安装软件

    上面简单列出了源码安装的sls文件书写思路. 涉及到一些固定的思路:如, 1,拷贝 解压安装时候需要依赖tar.gz存在 如果已安装则无需再次安装. 2,启动脚本 加入chk时候需要文件存在,如果已添 ...

  7. 源码安装Nginx以及用systemctl管理

    一.源码安装Nginx: 先安装gcc编译器(安装过的可以忽略) [root@localhost ~]# yum -y install gcc gcc-c++ wget 进入src目录 [root@l ...

  8. [svc]salt源码安装软件和yum安装软件

    上面简单列出了源码安装的sls文件书写思路. 涉及到一些固定的思路:如, 1,拷贝 解压安装时候需要依赖tar.gz存在 如果已安装则无需再次安装. 2,启动脚本 加入chk时候需要文件存在,如果已添 ...

  9. 烂泥:源码安装apache

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 最近要开始学习nagios监控方面的知识了,但是nagios与apache结合的比较紧密,所以本篇文章就先把apache的源码安装学习下. 我们现在分以 ...

随机推荐

  1. [洛谷P2106]Sam数

    题目大意:问长度为$n$的$Sam$数有几个,$Sam$数的定义为没有前导零,相邻两个数字之差绝对值小于等于$2$的数 题解:发现转移方程一定,可以矩阵快速幂. 卡点:没有特判$n=1$的情况 C++ ...

  2. CF359D:Pair of Numbers——题解

    https://vjudge.net/problem/CodeForces-359D http://codeforces.com/problemset/problem/359/D 题目大意: 给一串数 ...

  3. POI 10.28

    [POI2015]KUR 不考虑构造原串再匹配 考虑开始位置满足什么条件才能匹配. 显然,开始位置确定,后面的字符都确定了. 而且,a,n互质,所以必然能遍历n的剩余系,从不同位置开始,初始的a*s+ ...

  4. git使用笔记(十一)rebase

    By francis_hao    Oct 22,2017   git-rebase,改变commit的基础参照 概要 git rebase [-i | --interactive] [options ...

  5. Ubuntu16.04+Cuda8.0+1080ti+caffe+免OpenCV3.2.0+faster-rCNN教程

    一.事先声明:1.Ubuntu版本:Ubuntu使用的是16.04.而不是16.04.1或16.04.2,这三个是有区别的.笔者曾有过这样的经历,Git上一个SLAM地图构建程序在Ubuntu14.0 ...

  6. Codeforces Round #493 (Div. 2)D. Roman Digits 第一道打表找规律题目

    D. Roman Digits time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...

  7. bzoj 3289 Mato的文件管理 树状数组+莫队

    Mato的文件管理 Time Limit: 40 Sec  Memory Limit: 128 MBSubmit: 4325  Solved: 1757[Submit][Status][Discuss ...

  8. hdu4085 Peach Blossom Spring

    Peach Blossom Spring http://acm.hdu.edu.cn/showproblem.php?pid=4085 Time Limit: 10000/5000 MS (Java/ ...

  9. spoj COT2 - Count on a tree II

    COT2 - Count on a tree II http://www.spoj.com/problems/COT2/ #tree You are given a tree with N nodes ...

  10. 51nod 1190 最小公倍数之和 V2

    给出2个数a, b,求LCM(a,b) + LCM(a+1,b) + .. + LCM(b,b). 例如:a = 1, b = 6,1,2,3,4,5,6 同6的最小公倍数分别为6,6,6,12,30 ...