Build and Install PHP Module and Package

风行水上 @ 2014-02-07 23:59:20
标签:

    pecl

    PECL is a repository of PHP extensions. It's a sister of PEAR.

    PEAR is for pure PHP packages, while PECL is for C extensions.

    $ pecl install extname
    
    # OR #
    
    pecl install extname-0.1
    

    phpize

    phpize is a lower-level build tools to perform the build manually.

    The phpize command is used to prepare the build environment for a PHP extension.

    Basic Step

    % phpize
    % configure
    % make
    % make test     ;# optional
    % make install
    

    Misc.

    Built for 64bit:

    CFLAGS=-m64 CPPFLAGS=-m64 CCASFLAGS=-m64 ./configure
    

    Multiple version PHP:

    ./configure --with-php-config=/path/to/php-config
    
    标签:

      分享到:
      comments powered by Disqus

      25/28ms