结合Nginx以cgi方式安装php5.5.4
新建用户及用户组
groupadd webuser
useradd -g webuser webuser
下载php-5.5
下载链接:http://pan.baidu.com/s/1i3CBshv
解包
tar zxvf php-5.5.4.tar.gz
cd php-5.5.4
./configure --prefix=/server/php5 \
--with-mysql=/server/mysql \
--with-mysqli \
--with-jpeg-dir=/usr/lib64 \
--with-gd \
--with-curl \
--enable-mbstring=all \
--with-config-file-path=/server/php5/etc \
--enable-force-cgi-redirect \
--enable-soap \
--enable-fastcgi \
--enable-fpm
编译 并 安装
make && make install
cp ./php.ini-production /server/php5/etc/php.ini
编辑include_path
vi /server/php5/etc/php.ini
include_path = ".:/php/includes:/server/php5/lib/php"
cgi.fix_pathinfo=1
date.timezone = Asia/Shanghai
配置php-fpm
vi /server/php5/etc/php-fpm.conf
<value name="user">webuser</value>
<value name="group">webuser</value>
可以启动 php-fpm了
/server/php5/sbin/php-fpm start
编辑 nginx.conf
location ~ \.php$ {
root /web/xinfilm;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_intercept_errors on;
error_page 404 /404.html;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
重启Nginx完成配置
/server/nginx/sbin/nginx -s restart
最新文章
- vim vi Ubuntu
- 前端学PHP之命名空间
- Linux实战问题解决方案(1):Could not get lock
- require和include的区别
- centos 7 的几点改动
- 使用mysql_query()方法操纵数据库以及综合实例
- Android-----View绘制流程以及invalidate()等相关方法分析 .
- jdbc hibernate myBatis比较
- c 语言typedef 和 define的使用和区别
- python通过套接字来发送接收消息
- win7安装oracle 10g问题总结。
- Senparc.Weixin.MP SDK 微信公众平台开发教程(十九):MessageHandler 的未知类型消息处理
- 将Oracle 12c的某用户数据迁移至OracleXE的用户
- 浏览器通知--window.Notification
- Linux命令:readonly
- hbase-基础架构
- Upgrade Bash to 4+ on OS X
- 转换sql文件的create table语句为drop table语句
- Java_慎用方法级别的synchronized关键字
- 转:HL7 Tools suite
热门文章
- bfs学习
- ECharts 环形饼图 动态获取json数据
- dedecms v5.7 图片集“图集内容”无法调用的解决办法
- android 基础04-BroadCastReceiver
- sqlite数据库的char,varchar,text,nchar,nvarchar,ntext的区别
- 【编程技巧】Ext.MessageBox 大集合 不同的dialog图解加写法
- P2P视频模块
- jsonArray与 jsonObject区别与js取值
- JAVA异步加回调的例子
- 微信小程序+和风天气完成天气预报