安装相关依赖:

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gd gd2 gd-devel gd2-devel perl-CPAN pcre-devel mcrypt mcrypt-devel

配置:

./configure --prefix=/usr/local/php5  --enable-fpm --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --enable-gd-native-ttf  --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --enable-fileinfo  --with-mcrypt --enable-opcache=no

然后

make

# 先是出现了libmcrypt的错误   configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解决:这个执行 yum -y install libmcrypt libmcrypt-devel 就能解决,如果找不到的话可能就需要下载源码包来解决了

重新执行configure:

./configure --prefix=/usr/local/php5  --enable-fpm --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --enable-gd-native-ttf  --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --enable-fileinfo  --with-mcrypt-dir=/usr/local/mcrypt --enable-opcache=no

# 然后出现了zip的错误,如何处理请看:编译php出现zip错误

make install

到这里安装就成功了~!

源码编译php的更多相关文章

  1. Android 5.0源码编译问题

    如果是自己通过repo和git直接从google官网上download的源码,请忽略这个问题,但是由于google在国内被限制登录,通过这一种方法不是每个人都能download下来源码,通常的做法就是 ...

  2. Android stdio Apktool源码编译

    Android Apktool源码编译 标签(空格分隔): Android Apktool 源码编译 需求 习惯NetBeans调试smali需要用Apktool反编译apk,需要用-d的参数才能生成 ...

  3. SSH/SSL 源码编译安装简易操作说明

    环境:CentOS 6.7 安全加固需求,由于某盟扫描系统主机有SSL系列漏洞,客户要求必须修复: 解决方案:将SSH/SSL升级到最新版本,删除SSL旧版本(实测不删除旧版本某盟扫描无法通过). 当 ...

  4. Hadoop源码编译过程

    一.           为什么要编译Hadoop源码 Hadoop是使用Java语言开发的,但是有一些需求和操作并不适合使用java,所以就引入了本地库(Native Libraries)的概念,通 ...

  5. World Wind .NET源码编译问题处理

    World  Wind  .NET源码编译问题处理 下载了World_Wind_1.4.0_Source源码(http://worldwindcentral.com/wiki/NASA_World_W ...

  6. 源码编译安装 MySQL 5.5.x 实践

    1.安装cmakeMySQL从5.5版本开始,通过./configure进行编译配置方式已经被取消,取而代之的是cmake工具.因此,我们首先要在系统中源码编译安装cmake工具. # wget ht ...

  7. Linux 安装node.js ---- 源码编译的方式

    一 : 普通用户: 安装前准备环境: 1.检查Linux 版本 命令: cat /etc/redhat-release 2.检查 gcc.gcc-c++ 是否安装过 命令: rpm -q gcc rp ...

  8. 烂泥:mysql5.5数据库cmake源码编译安装

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 以前也写过一篇有关mysql5.0源码编译的文章,该文章为<烂泥:mysql5.0数据库源码编译安装>.但是MySQL自5.5版本以后,就开 ...

  9. Centos7.X 源码编译安装subversion svn1.8.x

    说明:SVN(subversion)的运行方式有两种:一种是基于Apache的http.https网页访问形式:还有一种是基于svnserve的独立服务器模式.SVN的数据存储方式也有两种:一种是在B ...

  10. centos6.5环境源码编译安装mysql5.6.34

    centos6.5环境源码编译安装mysql5.6.34 源码下载地址http://dev.mysql.com/downloads/mysql/5.6.html#downloads 选择Generic ...

随机推荐

  1. ORACLE内存结构:PGA And UGA,ORACLE用户进程、服务器进程

    执行一个SQL语句 执行查询语句的过程: 用户进程执行一个查询语句如select * from emp where empno=7839 用户进程和服务器进程建立连接,把改用户进程的信息存储到PGA的 ...

  2. 华为交换机忘记console的密码,怎么恢复出厂设置

    第一步:一般情况下由于密码忘记我们会被阻挡在交换机telnet远程管理界面之外. 第二步:虽然可以尝试console线连接交换机的控制接口,但是很多时候这个密码也被网络管理员进行了设置,不巧的是如果这 ...

  3. react 将字符串解析为markdown

    react 中有许多组件支持把字符串转化为markdown,并以html的形式展示出来.这里我试用了 react-markdown 和 hyperdown 两个库,发现hyperdown比较好,因为r ...

  4. yum源的报错排除

    echo "http://vault.centos.org/6.5/os/x86_64/" > /var/cache/yum/x86_64/6/base/mirrorlist ...

  5. windows 2003 iis php

    我的环境 是   windows server200 ee   iis6.0  程序是php 1.一台安装好的 Windows 2003 服务器,并且已经安装了 IIS 6. 2.下载 windows ...

  6. Outputting Strings in the Console

    Outputting Strings in the Console #include <windows.h> class Console {public:  enum fore_color ...

  7. 取MAC地址 (含多网卡),最好的方法,支持Vista,Win7

    取MAC地址 (含多网卡),最好的方法,支持Vista,Win7 unit Unit1; interface usesWindows, Messages, SysUtils, Variants, Cl ...

  8. HttpClient使用详解(转)

    http://blog.csdn.net/wangpeng047/article/details/19624529

  9. spring boot 总结

    一.什么是SpringBoot 描述:Spring Boot是Spring社区发布的一个开源项目,旨在帮助开发者快速并且更简单的构建项目.大多数SpringBoot项目只需要很少的配置文件.二.Spr ...

  10. 131. Palindrome Partitioning(回文子串划分 深度优先)

    Given a string s, partition s such that every substring of the partition is a palindrome. Return all ...