LINUX编译安装模块

wget http://pecl.php.net/get/zip-1.10.2.tgz
tar -zxvf zip-1.10.2.tgz -C /opt/
cd /opt/zip-1.10.2
/www/wdlinux/nginx_php-5.2.17/bin/phpize


./configure -with-php-config=/www/wdlinux/nginx_php-5.2.17/bin/php-config
make  &&  make  install

//此时会在zip/modules/下生成一个zip.so文件,将它拷贝到make之后给的一个路径下,如有同名的,覆盖之。

安装中可能存在这样的警告信息:
---------------------------------------------------------------------------------------------------------
 
 1:##configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
    
    wget http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download
    tar -zxvf re2c-0.13.5.tar.gz
    cd re2c-0.13.5
    ./configure && make && make install
2:requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
yum install zlib-devel

rpm -ihv zlib-devel-1.2.3-3.x86_64.rpm

你可能感兴趣的:(linux,php安装)