|Version 9 (modified by moo, 11 years ago) (diff)|
Building From Source
Pre-requirement check list
You don't have to check the following list yourself, the configure script will do for you, unless you have problem with configure/make.
- Get the XCache source files, see GettingSource.
- the lastest version of php 4.3.x, 4.4.x, 5.1.x, 5.2.x or 6.x series, 5.0.x isn't one of them. You can check the version with:
or setup a file with:
$ php-cgi -v PHP 4.4.3-dev (cgi-fcgi) (built: Mar 10 2006 18:46:02) Copyright (c) 1997-2006 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologiesand request it from your browser.
<?php phpinfo(); ?>
- Get the php works with webserver without XCache first!
- common build tools: c compiler, make, libtool (required by php build env)
- php building env installed. if you've install php yourself, make sure you have do "make install". check it out with:
you output may be vary from this, depending on your installtion of php. if it's not found, you should find it yourself
$ which phpize /usr/local/bin/phpize (or) /usr/bin/phpize
- indent (optional)
GettingSource, and cd into XCache directory.
~ $ cd ~/src/xcache ~/src/xcache $ _
everytime you upgrade php, or update to a new XCache, you have to do:
~/src/xcache $ phpize
and you get "configure" script now. ok, check what configure option we have.
(it is suggested to build outside of the source directory, so make an build directory first and enter it) ~/src/xcache $ mkdir build-by-moo ~/src/xcache $ cd build-by-moo (you're inside build-by-moo dir now) ~/src/xcache/build-by-moo $ ../configure --help ...... --enable-xcache Include XCACHE support. --enable-xcache-optimizer XCACHE: (N/A) --enable-xcache-coverage XCACHE: Enable code coverage dumper, NOT for production server --enable-xcache-assembler XCACHE: (N/A) --enable-xcache-disassembler XCACHE: Enable opcode to php variable dumper, NOT for production server --enable-xcache-encoder XCACHE: (N/A) --enable-xcache-decoder XCACHE: (N/A) --enable-xcache-test XCACHE: Enable self test - FOR DEVELOPERS ONLY!! ...... (run configure with options you selected now) ~/src/xcache/build-by-moo $ ../configure --enable-xcache --enable-xcache-disassembler (many output here, if you have problem, read the error message twice) (and search inside config.log, and check Pre-requirement in this page above) ~/src/xcache/build-by-moo $ make (many output here again, check if it success or error out.)
WARNING: If you're using something like /usr/local/php/bin/phpize which isn't the 1st one found in $PATH, remember to configure --with-php-config=/usr/local/php/bin/php-config, exactly the same directory as phpize
~/src/xcache/build-by-moo $ su Password: (input your root password here. whenever u see a red # in code listing in this wiki, it means you need to be root to do that) ~/src/xcache/build-by-moo # make install (many output here, and you can see where the XCache extension is installed into, remember the extension path)