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-fpmport

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<evp.h>

解决方式

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<curl-dir>/include/curl/

解决方式

yum install libcurl libcurl-devel

错误五

If configure fails try--with-vpx-dir=<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源代码安装的更多相关文章

  1. 小贝_php+redis简单实例

    php+redis简单实例 一.说明 因为redis是c/s架构.从这个角度上.不论什么符合redis的client要求的.都能够与redis进行通讯.官方提供了非常多的client. php在web ...

  2. 小贝_php+redis类型组合使用

    php_redis类型组合使用 一.类型组合说明 经过前面的文章介绍.已经知道redis有字符串.集合.列表.hash等内置数据类型. 这里以,无序集合为例,进行说明. 集合 set1的简图 1.从简 ...

  3. linux 下通过源代码安装程序 ./configure 解释

    大家 都知道在 linux 通过源代码 安装程序 1. 下载源码 2.解压缩 3. 执行 ./configure 4. make 5 make install make 命令 是对 makefile ...

  4. Linux程序包管理之yum及源代码安装

    第十六章.Linux程序包管理之yum及源代码安装 目录 yum介绍 yum配置文件 yum的repo配置文件中可用的变量 yum命令的使用 使用光盘作为本地yum仓库 如何创建yum仓库 编译安装的 ...

  5. ODOO 源代码安装要求

    ODOO 源代码安装要求 ref:http://www.odoo.com/documentation/10.0/setup/install.html#setup-install-source pyth ...

  6. 源代码安装 MySQL 5.6.28

    本文内容 创建 MySQL 用户和组 解压 MySQL 源代码包 生成配置安装文件 编译和安装 MySQL 配置文件 创建 MySQL 授权表 MySQL 目录授权 启动 MySQL 验证 MySQL ...

  7. Building nginx from Sources(从源代码安装nginx)

    Building nginx from Sources(从源代码安装nginx) The build is configured using the configure command.  安装用配置 ...

  8. 【转载】绝对干货!Linux小白最佳实践:《超容易的Linux系统管理入门书》(连载九)如何通过源代码安装软件

    除了使用Linux的包管理机制进行软件的安装.更新和卸载,从源代码进行软件的安装也是非常常见的,开源软件提供了源代码包,开发者可以方便的通过源代码进行安装.从源码安装软件一般经过软件配置.编译软件.执 ...

  9. 源代码安装GIT

    参考URL:http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=25150840&id=4250659 若是条件允许,从源代 ...

随机推荐

  1. Hadoop2.9.1安装教程_环境Ubuntu_VMware安装

    一,环境选择 Hadoop需要运行在linux系统之下,所以有以下两种选择:1,安装双系统,缺点:此方式比较麻烦而且并不适合初学者,因为之后的安装以及配置过程可能会遇到许多问题,这需要我们上网去搜索. ...

  2. 重启rsyslog服务时出现问题(误删/var/log/messages解决方案)

    今天修改了/etc/rsyslog.conf中的内容后,想着要通过systemctl restart rsyslog重启服务,但是执行完命令后,总感觉/etc/rsyslog.conf中修改的内容没有 ...

  3. Jquery-select元素操作方法

    jQuery获取Select元素,并选择的Text和Value: $("#select_id").change(function(){//code...}); //为Select添 ...

  4. 使用excel进行数据挖掘(6)---- 预測

    在配置环境后,能够使用excel进行数据挖掘. 环境配置问题可參阅: http://blog.csdn.net/xinxing__8185/article/details/46445435 例子 DM ...

  5. 《Head First 设计模式》学习笔记——适配器模式 + 外观模式

    在ADO.NET中.对于我们从数据库中取出的数据都要放到一个DataSet中,无论你是Access的数据库,还是SQL的数据库,或者是Oracle的数据库都要放到DataSet中..NET中并没有提供 ...

  6. [luogu P1776] 宝物筛选 解题报告(单调队列优化DP)

    题目链接: https://www.luogu.org/problemnew/show/P1776 题目: 终于,破解了千年的难题.小FF找到了王室的宝物室,里面堆满了无数价值连城的宝物……这下小FF ...

  7. xBIM 基础07 创建WebBIM文件

    系列目录    [已更新最新开发文章,点击查看详细]  xBIM项目提供了一个IFC文件的Web查看器.当你想把IFC转换成紧凑的WexBIM时,需要 xBIM Essentials 和 xBIM G ...

  8. zookeeper的选举机制

    1)半数机制:集群中半数以上机器存活,集群可用.所以zookeeper适合装在奇数台机器上. 2)Zookeeper虽然在配置文件中并没有指定master和slave.但是,zookeeper工作时, ...

  9. VisualStudio UnitTest FrameWork

    当创建单元测试时,Microsoft.VisualStudio.TestTools.UnitTesting的名字控件会添加到测试项目中,该名字控件中包含很多有用的类: 断言类:在单元测试中验证条件 初 ...

  10. 推荐几个bootstrap 后端UI框架

    转载地址 https://blog.csdn.net/u013816448/article/details/81563051