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. django-7-django模型系统

    <<<常用的模型字段类型>>>https://docs.djangoproject.com/en/2.1/ref/models/fields/#field-type ...

  2. sql where条件子句

    where中可用的运算符: where 的执行 是从右到左: where的SQL优化:(where条件特别多的情况下,效果明显) 对于and,应该尽量把假的放到右边. 对于or,应该尽量把真的放到右边 ...

  3. 小记如何有顺序的搭建一个Spring的web项目

    如何有顺序的搭建一个Spring的web项目 一.新建一个简单的maven,war工程 eclipse下如有报错,右键 Deployment 单击 Generate 生成web.xml后可解决报错 二 ...

  4. JS中的DOM操作怎样添加、移除、移动、复制、创建和查找节点

    DOM操作怎样添加.移除.移动.复制.创建和查找节点? (1)创建新节点 createDocumentFragment() //创建一个DOM片段 createElement() //创建一个具体的元 ...

  5. Tomcat example 应用信息泄漏漏洞及修复

    Tomcat 是一款开源的 Web 应用服务器软件.Tomcat 属于轻量级应用服务器,在中小型系统和并发访问用户不多的场合下被普遍使用,是开发和调试 JSP 程序的首选. 漏洞描述 Tomcat 在 ...

  6. freemark实现遍历 list,每行三个

    我的做法是先做一个模板,这三个只都是从list里取出来的 在后台将每三个值放到一个map里 List<Map<String, Object>> newsList=new Arr ...

  7. nyoj 1189 yougth和他的朋友们 (DP)

    题目:pid=1189" target="_blank">nyoj 1189 yougth和他的朋友们 这题目是14年北京赛区的原题.讲题的时候说有三种解法,我们是 ...

  8. 实践补充 Installing Tomcat 7.0.x on OS X

    我的 Mac 下是1.6的 SDK,下载 Tomcat 8.0 执行后,訪问 http://127.0.0.1:8080 并无反应,并且关闭脚本会报错 : Unsupported major.mino ...

  9. linux内核模块笔记

    主题: 1. 嵌入式基础知识 2. linux内核介绍 3. 内核的编译和安装(x86) 4. 第一个模块 5. 模块的相关工具 6. 模块的符号导出 7. 模块的參数 1.看linux/module ...

  10. UVALive 4225 / HDU 2964 Prime Bases 贪心

    Prime Bases Problem Description Given any integer base b >= 2, it is well known that every positi ...