php 5.5.1 编译安装过程
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 编译安装过程的更多相关文章
- 转-httpd 2.4.4 + mysql-5.5.28 + php-5.4.13编译安装过程
一.编译安装apache 1.解决依赖关系 httpd-2.4.4需要较新版本的apr和apr-util,因此需要事先对其进行升级.升级方式有两种,一种是通过源代码编译安装,一种是直接升级rpm包.这 ...
- Mapnik 编译安装过程
首先总结一下,Linux(windows上没有测试过)上Mapnik的编译与测试就是一部心酸血泪史呀,如果您没有做好思想准备,那就出门左转,看点有意思的去吧,编译这个太煎熬了. 安装PostgreSQ ...
- LAMP环境源码编译安装过程
LAMP环境源码编译安装过程 一.Apache的安装 1.1.apache软件包及依赖包准备 httpd-2.4.29.tar.bz2 apr-1.6.3.tar.gz apr- ...
- mysql5.5编译安装过程(自己总结)
一,安装过程 //创建mysql安装目录,创建数据存放目录,创建用户和用户组与赋予数据存放目录权限 mkdir -p /usr/local/mysql/ mkdir -p /data/mysql/ g ...
- php编译安装过程中遇到问题
编译安装PHP时遇到的问题 问题1: configure: error: xml2-config not found. Please check your libxml2 installation. ...
- LAMP架构编译安装过程详解
linux Git 安装 1.安装git依赖包 . yum install -y perl-ExtUtils-MakeMaker package . yum install -y tcl build- ...
- R 在linux redhat 6.5的编译安装过程
下载源码包 在http://cran.r-project.org/mirrors.html,选择一个国内镜像下载需要的版本,比如:http://mirror.lzu.edu.cn/CRAN/src/b ...
- mtd-utils编译安装过程
git clone git://git.infradead.org/mtd-utils.git cd mtd-utils apt install -y libssl-dev libzlb libzst ...
- 不要着急改代码,先想想--centos 6.8下编译安装tmux
诸位读者新年好,2017开年第一篇博客,请允许我先问候一下看到这篇博客的诸位.写博客是我2017年定下的目标之一,希望我会坚持下去. 最近打算尝试一下tmux这个神器,于是有了这一篇关于思维方式的Bl ...
随机推荐
- bzoj 1208: [HNOI2004]宠物收养所 set
1208: [HNOI2004]宠物收养所 Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 7328 Solved: 2892[Submit][Sta ...
- BestRW团队项目创意以及NABCD
一.写在前面 这次的团队项目我们队选到的是自由选题,与其说是选,不如说是分配.毕竟我们组游戏排名倒数第二···其实当我第一次听说我们队排倒数第二的时候我是有点不爽的,毕竟在这后面能够抽到的题目都是剩下 ...
- mac下pmset的使用方法
在终端输入:pmset -g custom 这个命令可以显示系统所有的电源设置 lidwake: 当屏幕掀开的时候唤醒Mac,1是开启 0是关闭autopoweroff: 如果Mac处于睡眠状 ...
- JavaSE复习_10 多线程复习
△wait()和sleep()的区别: 1.wait():没有等待时间,而sleep()需要有等待时间作为参数. 2.在同步中对于CPU的执行权和锁的处理不同: wait()会释放执行权和锁. ...
- Volley框架的流程图分析
接着上一篇Volley框架的使用,这一篇主要主要讲Volley框架运作的原理.主要使用流程图来叙述,简单的分析了整个流程的过程,具体的请参考源代码或者查看我上一篇在文章末尾添上的链接. 一 ...
- 转!!JavaBean,List,Map转成json格式
public class User { private String username; private String password; public String getUsername() { ...
- jQuery内置函数 ready
jQuery给我们提供了一些非常实用的函数 ready:加载函数 传统事件只能绑定一个函数 后面的函数会把前面的函数覆盖 js中用的是 window.onload = function(){}; j ...
- hiho_1053_居民迁移
题目大意 有N个居民点在一条直线上,每个居民点有一个x表示坐标,y表示居民点的现有居民数.现在要求将居民点的居民重新分配,每个居民点的居民最远迁移的距离为R,要求分配完之后,居民点中居民数最多的居民点 ...
- python语法笔记(七)
python标准库 Python有一套很有用的标准库(standard library).标准库会随着Python解释器,一起安装在你的电脑中的.它是Python的一个组成部分.这些标准库是Pytho ...
- python语法笔记(一)
1. python中多个函数或者类定义可以放在一个.py 文件中,视为一个模块.模块的.py文件中,一般要写 if __name__ == '__mian__' 用来单独执行该模块内的某些函数. 2. ...