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. python 多列表对应的位置的值形成一个新的列表

    list1 = [1, 2, 3, 4, 5] list2 = ['a','b', 'c', 'd', 'e'] list3 = [1, 2, 3, 4, 5] multi_list = map(li ...

  2. POJ 3071

    求概率.其实跟枚举差不多,输入n即是要进行n轮比赛.对每一支球队,设求1的概率,首先1要与2比赛为p1,这是第一轮,第二轮时,1要与3(打败3为p2),4(打败4为p3)中胜者比赛,由于是概率,则两者 ...

  3. HDU 5410(2015多校10)-CRB and His Birthday(全然背包)

    题目地址:HDU 5410 题意:有M元钱,N种礼物,若第i种礼物买x件的话.会有Ai*x+Bi颗糖果,现给出每种礼物的单位价格.Ai值与Bi值.问最多能拿到多少颗糖果. 思路:全然背包问题. dp[ ...

  4. 【Allwinner ClassA20类库分析】 2.free pascal语法及结构简析

        上一节介绍了Lazarus一般的开发操作流程,对于不熟悉pascal语言的朋友可能看的还是不大明确.不知道pascal代码里都应该包括什么或起什么作用.这回就简单地介绍下语法及代码文件的结构. ...

  5. hdoj 1013Digital Roots

     /*Digital Roots Problem Description The digital root of a positive integer is found by summing th ...

  6. Baby_Step,Gaint_Step(分析具体解释+模板)

    下面是总结自他人博客资料.以及本人自己的学习经验. [Baby_Step,Gaint_Step定义] 高次同余方程. BL == N (mod P) 求解最小的L.因为数据范围非常大,暴力不行 这里用 ...

  7. oracle rac 巡检过程详解

    一 RAC环境 RAC架构,2节点信息 节点1 SQL> show parameter instance NAME                                 TYPE    ...

  8. javascript系列-Class1.JavaScript基础

    欢迎加入前端交流群来py:749539640 转载请标明出处!   JavaScript概述        一个页面分成三个部分,结构,样式,行为.               HTML代表了页面的结 ...

  9. Python一行代码获得IP地址

    比较靠谱的方法, 通过构造UDP包获得本机IP地址   python -c "import socket;print([(s.connect(('8.8.8.8', 53)), s.gets ...

  10. MyBatis数据持久化(一)准备工作

    MyBatis简介 mybatis的前生是ibatis,它是一款非常优秀的java持久层框架,所有sql语句写在配置文件中,和另外一款比较知名的orm框架hibernate比起来显得更加小巧灵活,也是 ...