I wrote this shell script to automate the
[list]
[]Installation of a custom PHP.ini configuration
[]Installation of Drupal
[]Installation of Drush (the command-line tool for Drupal), and
[]The installation of the Upload Progress module that Drupal is always bugging you about
[/list]
You should be able to use it by doing the following:
[list]
[]Copy the code below and save it to a file called installthemall.sh
[]Log in to your FTP account (I prefer using WinSCP on Windows, because it will log you in with PuTTY as well regular FTP)
[]Upload installthemall.sh to your server
[]Open PuTTY and type sh installthemall.sh
[/list]
Note: this assumes you want to install Drupal 7.7 (which is currently the latest version). To change that, find/replace drupal-7.7 with whichever version you wish to install.
#!/bin/sh
export PATH=/usr/local/php53/bin:$PATH
wget http://pecl.php.net/get/uploadprogress -O uploadprogress-1.0.2.tgz &
wait
tar -zxvf uploadprogress-1.0.2.tgz &
wait
cd uploadprogress-1.0.2
phpize &
wait
./configure --with-php-config=/usr/local/php53/bin/php-config &
wait
make &
wait
mkdir $HOME/.php &
wait
mkdir $HOME/.php/5.3 &
wait
cp ./modules/uploadprogress.so $HOME/.php/5.3/
echo "extension = $HOME/.php/5.3/uploadprogress.so" > $HOME/.php/5.3/phprc &
wait
killall php53.cgi &
wait
mkdir $HOME/cgi-bin &
wait
cp /etc/php53/php.ini $HOME/cgi-bin/php.ini &
wait
chmod 755 $HOME/cgi-bin
cat << EOF > $HOME/cgi-bin/php-wrapper.fcgi
#!/bin/sh
exec /dh/cgi-system/php53.cgi $*
EOF
wait
chmod 755 $HOME/cgi-bin/php-wrapper.fcgi
chmod 640 $HOME/cgi-bin/php.ini
export PHP_CONFIG_FILE_PATH=$HOME/cgi-bin
cd $HOME/
wget http://ftp.drupal.org/files/projects/drupal-7.7.tar.gz &
wait
tar -xz --directory="." -f "drupal-7.7.tar.gz" &
wait
wget http://ftp.drupal.org/files/projects/drush-7.x-4.4.tar.gz &
wait
tar -xz --directory="." -f "drush-7.x-4.4.tar.gz" &
wait
ln -s $HOME/cgi-bin $HOME/drupal-7.7/cgi-bin &
wait
echo "alias drush="$HOME"/drush/drush" >> $HOME/.bashrc &
wait
rm drupal-7.7.tar.gz
rm drush-7.x-4.4.tar.gz
rm uploadprogress-1.0.2.tgz
echo '
=========================== ALMOST DONE... ====================================
One more thing to do though: add the following 4 lines to the VERY TOP
of the file called ".htaccess":
Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi
Good luck!'