小贝_php源码安装

php中文网
发布: 2016-06-23 13:28:38
原创
1221人浏览过

php安装

 一、本文档相关文件下载

二、php安装


一、本文档相关文件下载

1、php下载地址: http://php.net/downloads.php

立即学习PHP免费学习笔记(深入)”;

(备注: 本文档下载的是php版本为php-5.6.11.tar.gz)

2、本测试机系统为 CentOS release 6.3 (Final)

 

二、php安装

1、安装php

           a、解压压缩文件 tar ?zxf php-5.6.11.tar.gz

           b、进入解压目录后,执行

           ./configure --prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql--enable-fpm --enable-xml --enable-soap --enable-mbstring --enable-sockets--with-curl  --enable-zip  --enable-ftp --with-gd --with-bz2--with-openssl --with-zlib --with-mhash --enable-exif --enable-sockets--enable-mbstring --enable-xml --enable-fpm --enable-soap --with-gd --with-curl--with-mcrypt=/usr/local/libmcrypt --with-imap --with-imap-ssl --with-jpeg-dir--with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf--enable-gd-jis-conv --with-kerberos

       c、编译安装 make && make install

2、启动php

         a、复制php.ini文件

       [root@hadoop phpsrc]# cpphp.ini-production /usr/local/php/etc/php.ini

        b、启动php-fpm

       [root@hadoop etc]# cpphp-fpm.conf.default php-fpm.conf

       [root@hadoop php]# ./sbin/php-fpm

        c、检查php-fpm端口

3、测试php

  

        

 

4、常见异常及处理

错误一

checking libxml2 installdir... no

checking for xml2-configpath...

configure: error:xml2-config not found. Please check your libxml2 installation.

解决方案

yum install libxml2

yum install libxml2-devel

错误二

configure: error: Cannot find OpenSSL's

代码小浣熊
代码小浣熊

代码小浣熊是基于商汤大语言模型的软件智能研发助手,覆盖软件需求分析、架构设计、代码编写、软件测试等环节

代码小浣熊 51
查看详情 代码小浣熊

解决方案

yum install openssl-devel

错误三

checking for BZip2 in default path...not found

configure: error: Please reinstall theBZip2 distribution

解决方案

yum install bzip2-devel

错误四

checking for cURL in default path...not found

configure: error: Please reinstall thelibcurl distribution -

    easy.h should be in/include/curl/

解决方案

yum install libcurl libcurl-devel

错误五

If configure fails try--with-vpx-dir=

configure: error: jpeglib.h not found.

解决方案

yum install libjpeg libpng freetypelibjpeg-devel libpng-devel freetype-devel

错误六

configure: error: utf8_mime2text() hasnew signature, but U8T_CANONICAL is missing. This should not happen. Checkconfig.log for additional information

解决方案

yum install libc-client-devel

错误七

configure: error: This c-client libraryis built with Kerberos support.

Add --with-kerberos to your configureline. Check config.log for details.

解决方案

把--with-kerberos加入./configure中

错误八

configure: error: mcrypt.h not found.Please reinstall libmcrypt.

解决方案

yum install libmcrypt 或者

下载libmcrypt包

(编译安装  ./configure --prefix=/usr/local/libmcrypt   make && make install)

版权声明:本文为博主原创文章,未经博主允许不得转载。

PHP速学教程(入门到精通)
PHP速学教程(入门到精通)

PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号