Building PHP on Linux/Unix with Apache
In this section, we will look at one way of installing PHP with Apache on Linux/Unix. The process is more or less the same for any Unix operating system. Although you might be able to find pre-built versions of PHP for your system, compiling PHP from the source gives you greater control.
To download the PHP distribution files, go to the home of PHP, http://www.php.net/, and follow the link to the Downloads section. Grab the latest version of the source code—for this example, we are using 4.3.3. Your distribution will be named something similar to php-version.tar.gz, where version is the most recent release number. This archive will be a compressed tar file, so you will need to unpack it:
# gunzip < php-version.tar.gz ...
Get Sams Teach Yourself PHP, MySQL® and Apache All in One now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.