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. mysql局域网服务搭建

    首先配置电脑Mysql环境变量 新建 Mysql服务配置 CMD >命令 : mysql -u root -p 4. 创建用户 Mysql 用户权限分配 5 重启服务 如果还不能访问就一定是你的 ...

  2. 【Codeforces Round #482 (Div. 2) C】Kuro and Walking Route

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 把x..y这条路径上的点标记一下. 然后从x开始dfs,要求不能走到那些标记过的点上.记录节点个数为cnt1(包括x) 然后从y开始 ...

  3. ASP.NET-技巧01

    ==符号的写法 ViewBag.StatusMessage = message == ManageMessageId.ChangePasswordSuccess ? "你的密码已更改.&qu ...

  4. ASP.NET-权限管理五张表

    ASP.NET 权限管理五张表 权限管理的表(5张表) 每个表里面必有的一些信息 序号 名称  字段  类型   主键 默认值 是否为空 备注 1  用户ID  ID      INT     是   ...

  5. HDU——T 1498 50 years, 50 colors

    http://acm.hdu.edu.cn/showproblem.php?pid=1498 Time Limit: 2000/1000 MS (Java/Others)    Memory Limi ...

  6. leetcode笔记:Find Median from Data Stream

    一. 题目描写叙述 Median is the middle value in an ordered integer list. If the size of the list is even, th ...

  7. HDU 4329 Contest 3

    果然换个编译器就过了.总的来说,不难,不过就是处理一些空格.学习了一个新的类 istringstream可以按空格划分.然后,那条式子要理解. 式子的意义是: 找到一个串,该串在query中是第几个找 ...

  8. Scratch单机版下载

    Scratch单机版下载 这两个地址速度比较快: Adobe Air:http://7dx.pc6.com/wwb5/AdobeAIR2800127.zip Scratch :http://7dx.p ...

  9. Eureka Server的REST端点

    Eureka Server的REST端点 Windows下面可以安装Curl: 使用more命令可以显示xml内容: D:\Java\IdeaProjects>more rest-api-tes ...

  10. 【Android】Android程序自己主动更新

    App自己主动更新的步骤可分为三步: 检查更新(假设有更新进行第2步,否则返回) 下载新版的APK安装包 安装APK 以下对这三步进行解释.当中会穿插相应代码.App自己主动更新的这三步所有被封装到了 ...