没想到编译个LAMP这么麻烦又简单。

按照官网的做就可以了,只是我在CentOs下一直会提示出现这个错误

按照官网的安装方法:install

用下面的参数:

./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql --prefix=/usr/local/php5.6 --with-iconv-dir=/usr/local/lib

总是提示下面这个错误:

/php-5.6./ext/iconv/iconv.c:: more undefined references to `libiconv' 

缺少libiconv,真奇怪,不是有么。

去安装libiconv就行了

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz
wget http://www2d.biglobe.ne.jp/~msyk/software/libiconv/libiconv-1.13-ja-1.patch.gz
tar zxvf libiconv-1.13.tar.gz
cd ./libiconv-1.13.tar.gz
gzip -dc ../libiconv-1.13-ja-.patch.gz | patch -p1
make
make install ln -s /usr/local/lib/libiconv.so.2.5. /usr/local/lib64/libiconv.so
ln -s /usr/local/lib/libiconv.so.2.5. /usr/local/lib64/libiconv.so.

依次执行后用下面的这个参数配置安装信息:

./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql --prefix=/usr/local/php5.6 --with-iconv=shared,/usr/local

就可以了,记得make之前,要 make clean

参考文章:http://d.zeromemory.info/2014/03/01/php5-4-25-build-error-iconv.html

后来我加了一些常用的参数(选项分先后)

./configure --with-apxs2=/usr/local/httpd/bin/apxs --prefix=/usr/local/php5.6 --with-iconv=shared,/usr/local --enable-bcmath --enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp --enable-inline-optimization --with-kerberos --enable-mbregex --enable-mbstring --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pdo-mysql --enable-opcache --with-pear --enable-soap --enable-sockets --enable-wddx --with-xsl --enable-zip --with-zlib --with-bz2 --with-openssl --enable-cgi --enable-fpm

编译apache2的module,以rewrite_mod举例:

到/usr/src/httpd-2.2/modules/mappers
然后执行 /usr/local/apache2/bin/apxs -c -i mod_rewrite.c
再添加 LoadModule rewrite_module modules/mod_rewrite.so 到对应的位置

引用:

编译mod来自:http://forum.ivorde.ro/apache-2-2-installation-of-mod-rewrite-module-without-recompiling-whole-apache-t67.html

编译php5.6的更多相关文章

  1. 编译PHP5缺t1lib包安装

    t1lib_doc.dvi Error解决: 1. 下载t1lib-5.1.2.tar.gz2. 解决依赖关系:sudo apt-get build-dep t1lib 3. 安装:./configu ...

  2. 编译php-5.6出错,xml2-config not found

    今天在centos上编译PHP-5.6 cd php-5.6 ./configure --prefix=/usr/local/php5./ --with-apxs2=/usr/local/apache ...

  3. CentOS6.7编译php5安装错误大全

    在CentOS编译PHP5的时候有时会遇到以下的一些错误信息,基本上都可以通过yum安装相应的库来解决.以下是具体的一些解决办法: 复制代码 代码如下: checking for BZip2 supp ...

  4. 编译php-5.5.15出错,xml2-config not found

    今天在centos上编译php-5.5.15, cd php-5.5.15 ./configure --prefix=/usr/local/php/ --with-config-file-path=/ ...

  5. 编译php-5.3.28

    1. 下载php-5.3.28 2. 编译/安装 ./configure --prefix=/usr/local/php --enable-fpm --enable-maintainer-zts -- ...

  6. 编译php5.4的时候出现错误----configure: error: in `/usr/local/src/php540/php-5.4.0':

    错误如下:checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep - ...

  7. Magento 编译 php5.6.21 命令

    ./configure  '--prefix=/alidata/server/php' '--enable-opcache' '--with-config-file-path=/alidata/ser ...

  8. windows下编译php5.2.17这是闹哪样?

    参考:http://demon.tw/software/compile-php-on-windows.html

  9. 源码编译php5.4 ./configure参数

    ./configure \--prefix=/usr/local/php/5.4 \--with-config-file-path=/usr/local/php/5.4/etc \--with-con ...

随机推荐

  1. nginx 学习八 高级数据结构之基数树ngx_radix_tree_t

    1 nginx的基数树简单介绍 基数树是一种二叉查找树,它具备二叉查找树的全部长处:检索.插入.删除节点速度快,支持范围查找.支持遍历等. 在nginx中仅geo模块使用了基数树. nginx的基数树 ...

  2. Flex中 Array 的IndexOf 的作用

    Flex中 Array 的IndexOf 的作用 1.说明    indexOf用于在索引中从小到大查找,假设查得到就返回索引值,查不到就返回-1: 2.实例 (1)设计源代码 <?xml ve ...

  3. Linux 内核动态函数调用可视化工具

    要求: python .7以上 https://www.python.org/ftp/python/ EG:wget --no-check-certificate https://www.python ...

  4. UNIX基础知识之程序和进程

    一.程序 程序(program)是存放在磁盘上.处于某个目录中的一个可执行文件.使用6个exec函数中的一个由内核将程序读入存储器,并使其执行. 二.进程和进程ID 程序的执行实例被称为进程(proc ...

  5. 基于 Jenkins 快速搭建持续集成环境--转

    源地址:http://www.ibm.com/developerworks/cn/java/j-lo-jenkins/ 持续集成是一种软件开发实践,对于提高软件开发效率并保障软件开发质量提供了理论基础 ...

  6. 几个常用myeclipse快捷键

    Ctrl + D:直接删除光标所在行 Alt + ↑:向上移动光标所在行 Alt + ↓:向下移动光标所在行 Ctrl + Alt + ↑:直接向上复制光标所在行内容 Ctrl + Alt + ↓:直 ...

  7. cocos2d-x lua 使用http(下载图片, POST JSON)

    cocos2d-x lua 使用http(下载图片, POST JSON) version: cocos2d-x 3.6 1.使用http post json与服务器交互 require(" ...

  8. css笔记01:CSS例子

    body { margin:0; padding:0; background:#000 url('images/backgrounds/star.png') no-repeat fixed; font ...

  9. LeetCode 278

    First Bad Version You are a product manager and currently leading a team to develop a new product. U ...

  10. Linux free字段解析

    下面是free的运行结果,一共有4行.为了方便说明,我加上了列号.这样可以把free的输出看成一个二维数组FO(Free Output).例如: FO[2][1] = 24677460 FO[3][2 ...