centos安装php php-fpm 以及 配置nginx
来源:互联网 发布:知乎机构账号怎么注销 编辑:程序博客网 时间:2024/05/22 14:48
下载php源码包
http://www.php.net/downloads.php
安装php
可能出现的错误
出现错误: congigure error: xml2-config not found
解决办法:
1.执行命令:
2.查看是否成功:
出现错误: congigure error: Cannot find OpenSSL's <evp.h>
解决办法:
出现错误: configure: error: Please reinstall the BZip2 distribution
解决办法:
出现错误: configure: error: Please reinstall the libcurl distribution -easy.h should be in <curl-dir>/include/curl/
解决办法:
出现错误:configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决办法:
出现错误:configure: error: Please reinstall readline - I cannot find readline.h
解决办法:
编译
可能出现的错误
编译PHP5.5 make 时出现错误
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
解决办法:
这是由于内存小于1G所导致.Disable fileinfo support 禁用 fileinfo
在./configure加上选项:
配置环境变量
添加 PHP 命令到环境变量
在末尾加入
要使改动立即生效执行
查看环境变量
查看php版本
PHP 5.5.13 (cli) (built: Jun 20 2014 11:11:26)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
配置启动php-fpm
启动php-fpm
配置nginx
修改nginx的配置文件(/etc/nginx/conf.d/default.conf)
检查nginx
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
则 已经配置正确
重启nginx
在web根目录下创建index.php
<?php echo phpinfo(); ?>
在浏览器中输入http://ip/index.php查看成功即可。
//注:根据自己的配置修改web根目录即可,如我的为/usr/share/nginx/html。
如果启动php-fpm出现错误: can not get uid for www,修改php-fpm.conf中user为nginx group为nginx
- centos安装php php-fpm 以及 配置nginx
- centos安装php php-fpm 以及 配置nginx
- centos安装php php-fpm 以及 配置nginx
- Nginx + PHP(php-fpm) 安装以及配置
- centos 下编译安装nginx + php 配置nginx+php-fpm
- centos安装php php-fpm nginx
- CentOS上安装php, nginx, php-fpm
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- nginx php-fpm安装配置
- Swift
- Redis2.8.13安装配置
- 浅谈 STL 中的空间配置器一点小小心得。
- 隐马尔可夫模型的评估问题(后向算法)(转载)
- JavaScript常用数组算法总结
- centos安装php php-fpm 以及 配置nginx
- 报错:/usr/sbin/smartctl not found.error:error: install: %pre scriptlet failed (2), skipping cvuqdisk
- Java如何给极光推送发消息
- windows7/10安装vagrant
- android 一个界面管理多种状态方案
- 链家笔试:素数打表
- ubuntu下qt debug一直处于lauching Debugger(启动debugger)
- 基本数据类型参数传递与引用型数据类型参数传递
- geohash编码 (腾讯2017校招开发工程师试卷一)