• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

小贝_php源码安装

php 搞代码 3年前 (2022-01-23) 14次浏览 已收录 0个评论

PHP安装

一、本文档相关文件下载

二、php安装


一、本文档相关文件下载

1、php下载地址: http://php.net/downloads.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

解决方案

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 fou本文来源gaodai#ma#com搞@@代~&码*网/搞gaodaima代码nd

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)

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


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:小贝_php源码安装

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址