View Single Post
  #4  
Old 6th September 2011, 16:35
counterpoint counterpoint is offline
Junior Member
 
Join Date: Jan 2010
Posts: 21
Thanks: 1
Thanked 5 Times in 5 Posts
Default

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:
Code:
dpkg-reconfigure dash
and choosing the "no" option. Alternatively, change the shebang on the first line to specifically select bash:
Code:
#!/bin/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:
Code:
# Override choice of 64 bit
CHECK="1"
#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:
Code:
aptitude search make
and if necessary installed with
Code:
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:
Code:
#!/bin/sh
PHPRC=/etc/php52/cgi/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=8
exec /usr/bin/php52/php-cgi
(although I actually use different values for the configuration parameters)
Reply With Quote