Thanks very much for this helpful script. I ran into a few small issues along the way, and also found it useful to adapt the final result to suit How To Set Up Apache2 With mod_fcgid And PHP5 On Debian Lenny
(which also works fine for Squeeze). I already have a script for creating new sites in that environment.
First I found the script wouldn't run, because the target system still had the Squeeze default of the dash shell. That can be changed to defaulting to bash by running:
and choosing the "no" option. Alternatively, change the shebang on the first line to specifically select bash:
Then the system did not return anything with 64 in it from uname, so the selection of 32 bit or 64 bit compile was going wrong. For that I simply hacked the script to:
# Override choice of 64 bit
#CHECK=`uname -a | grep 'amd64'`
to choose 64 bit.
It also transpired that make was not installed in the target system. That can be checked by:
aptitude search make
and if necessary installed with
aptitude install make
If the result is to be used in conjunction with a system created using the "how to" mentioned above, then individual web sites can be set up exactly as in the "how to" except that the php-fcgi-starter file is changed to:
(although I actually use different values for the configuration parameters)