编译php源码时,怎么加上自定义的一些扩展
2013-12-08 10:43
597 查看
wget https://github.com/php/php-src/archive/PHP-5.3.17.zip unzip PHP-5.3.17.zip
Get mysqlnd_qc:
wget http://pecl.php.net/get/mysqlnd_qc-1.1.1.tgz tar -zxvf http://pecl.php.net/get/mysqlnd_qc-1.1.1.tgz mkdir -p php-src-PHP-5.3.17/ext/mysqlnd_qc cp -R mysqlnd_qc-1.1.1/* php-src-PHP-5.3.17/ext/mysqlnd_qc
Get APC:
wget http://pecl.php.net/get/APC-3.1.13.tgz tar -xzvf APC-3.1.13.tgz mkdir -p php-src-PHP-5.3.17/ext/apc cp -R APC-3.1.13/* php-src-PHP-5.3.17/ext/apc/
Compile: (maybe don't need all on other systems)
sudo yum install bison sudo yum install libxml2 libxml2-devel sudo yum install autoconf213 sudo yum install httpd-devel sudo yum install bzip2 lbzip2 bzip2-libs bzip2-devel export PHP_AUTOCONF=/usr/bin/autoconf-2.13 ./buildconf --force make clean && make
(for me the linkage failed and had to add '-lpthread' to linkage)
make test sudo make install
I used also the following 2 commands but I don't remember for what and when...
phpize aclocal
Run the same
./configureas
in phpinfo and add these options:
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd-qc --enable-mysqlnd-qc-apc --enable-mysqlnd --enable-apc --enable-static=apc
相关文章推荐
- c写php扩展之编译php源码,创建扩展模块,编写扩展demo
- php扩展开发1(apache和php源码编译)
- php编译后漏掉一些参数怎么办
- Mac 下编译 PHP 扩展遇到的一些问题
- php扩展开发笔记(2)多个源码文件的配置和编译
- c写php扩展之编译php源码,创建扩展模块,编写扩展demo
- c写php扩展之编译php源码,创建扩展模块,编写扩展demo
- php源码编译安装时的一些常见错误解决办法
- php扩展在编译源码成so的时候,重复定义错误
- 还原php的zoeeyguard扩展源码编译前的配置内容
- 源码编译安装PHP以及相关扩展的安装
- ubuntu 14.04上源码编译安装php7
- LINUX下PHP编译添加相应的动态扩展模块so(不需要重新编译PHP,以openssl.so为例)
- 【Python笔记】源码编译安装Python时,如何支持自定义安装的高版本openssl库
- centOS 5.6 编译安装Memcached 与Memcache的PHP扩展
- 通过源码包php-5.4.9.tar.gz编译安装PHP之后,如何加载动态模块,不需要重新配置PHP
- 编译安装php-amq扩展
- Redis系列-php怎么通过redis扩展使用redis
- linux 下编译安装php mongodb扩展(佚名)
- Linux下利用phpize安装memcashe的php源码扩展包