Det er ikk epræcis dette du leder efter, men dette script Downloader en Apache webserver, kompilerer php ind i kernen og installerer også en MySQL...
Scriptet er lavet til en FreeBSD, men med et par småændringer kan det nemt rettes til at virke på en Linux !
#!/bin/sh
# Platform: FreeBSD 4.0
# Notes: Apache + PHP sections should not change across platform
# Be sure to change the method for getting and adding MySQL
# Requirements: wget
####################################################################
# Get distributions
####################################################################
mkdir /root/software
cd /root/software
# Apache = src
wget
http://www.apache.org/dist/apache_1.3.12.tar.gztar -zxvf apache_1.3.12.tar.gz -C /usr/src
# PHP = src
wget
http://php.he.net/distributions/php-4.0.1.tar.gztar -zxvf php-4.0.1.tar.gz -C /usr/src
# MySQL (client/server) = pkg
wget
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/All/mysql-client-3.22.32.tgzwget
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/All/mysql-server-3.22.32.tgzpkg_add mysql-client-3.22.32.tar.gz
pkg_add mysql-server-3.22.32.tar.gz
####################################################################
# Configure
####################################################################
# Apache before PHP needed for PHP to compile
cd /usr/src/apache_1.3.12
./configure \\
\"--with-layout=Apache\" \\
\"--prefix=/usr/local/apache\" \\
\"--activate-module=src/modules/php4/libphp4.a\" \\
\"--enable-module=rewrite\" \\
\"$@\"
# PHP - be sure to have MySQL installed
cd /usr/src/php-4.0.1
./configure \\
\"--with-mysql\" \\
\"--enable-track-vars\" \\
\"--with-apache=../apache_1.3.12\" \\
\"$@\"
####################################################################
# Make
####################################################################
# PHP before Apache
cd /usr/src/php-4.0.1
make
make install
# Apache from start
cd /usr/src/apache_1.3.12
./configure \\
\"--with-layout=Apache\" \\
\"--prefix=/usr/local/apache\" \\
\"--activate-module=src/modules/php4/libphp4.a\" \\
\"--enable-module=rewrite\" \\
\"$@\"
make
make install
####################################################################
# Start Apache
####################################################################
/usr/local/apache/bin/apachectl start