As root, execute the following on commandline for a fresh install of Debian 5.0 Lenny. You can copy/paste most right to your terminal except in cases where you might get prompted for input (i.e. apt-get install, mysqladmin, vi, crontab).
Known bug: the php5-suhosin deb module for PHP will cause ~31 failures and ~11 exceptions.
Known bug: all three opcode caching extensions APC, eAccelerator, and xcache have a history of instability with PIFR clients. The alternative workaround to opcode caching is to mount the files directory in tmpfs, which is included as part of this configuration. The execution time difference between opcode cache and tmpfs mounting has been insignificant.
apt-get --no-install-recommends install build-essential mysql-server-5.0 apache2 apache2-threaded-dev php5 php5-cgi php5-cli php5-gd php5-common php-pear php5-curl php5-mysql cvs curl php5-dev libapache2-mod-php5 gawk patch htop rsync cron wget openssh-blacklist-extra
perl -pi -e 's/(\s+AllowOverride)\s+None$/\1 All/g' /etc/apache2/sites-available/default
perl -pi -e 's/(\s+CustomLog \/var\/log\/apache2\/access\.log combined)$/#\1/g' /etc/apache2/sites-available/default
perl -pi -e 's/(memory_limit =)\s+\d+M(.*?)$/\1 256M\2/g' /etc/php5/apache2/php.ini
perl -pi -e 's/(short_open_tag =)\s+On$/\1 Off/g' /etc/php5/apache2/php.ini
perl -pi -e 's/(expose_php =)\s+On$/\1 Off/g' /etc/php5/apache2/php.ini
perl -pi -e 's/(mysql\.allow_persistent =)\s+On$/\1 Off/g' /etc/php5/apache2/php.ini
perl -pi -e 's/(memory_limit =)\s+\d+M(.*?)$/\1 256M\2/g' /etc/php5/cli/php.ini
perl -pi -e 's/(short_open_tag =)\s+On$/\1 Off/g' /etc/php5/cli/php.ini
perl -pi -e 's/(expose_php =)\s+On$/\1 Off/g' /etc/php5/cli/php.ini
perl -pi -e 's/(mysql\.allow_persistent =)\s+On$/\1 Off/g' /etc/php5/cli/php.ini
mysqladmin -u root -p create drupal
mysqladmin -u root -p create drupal_checkout
*/2 * * * * /usr/bin/wget -O - -q -t 1 http://localhost/cron.php
cvs -z6 -d :pserver:anonymous:email@example.com:/cvs/drupal checkout -r DRUPAL-6-19 drupal
mv * ..
mv .htaccess ..
cvs -z6 -d:pserver:anonymous:firstname.lastname@example.org:/cvs/drupal-contrib checkout -r DRUPAL-6--1 -d cvs_deploy contributions/modules/cvs_deploy
cvs -z6 -d:pserver:anonymous:email@example.com:/cvs/drupal-contrib checkout -r DRUPAL-6--2-2 -d project_issue_file_review contributions/modules/project_issue_file_review
cp default.settings.php settings.php
$db_url = array();
$db_url['default'] = 'mysqli://username:password@localhost/drupal';
$db_url['pifr_checkout'] = 'mysqli://username:password@localhost/drupal_checkout';
chmod 777 files
chmod 777 files/review.log
chown www-data:www-data files/review.log
ln -s ./sites/default/files/checkout .
The symbolic link will be broken because PIFR should create the checkout directory on its own during the testing process.
Not a lot of testing has been done with variations to these additional configuration options in
/etc/mysql/my.cnf. This one is simply known to work.
#innodb_log_file_size = 32M
#innodb_log_group_home_dir = /var/lib/mysql
#innodb_data_home_dir = /var/lib/mysql
#innodb_data_file_path = ibdata1:100M:autoextend
#innodb_log_files_in_group = 2
#innodb_log_buffer_size = 1M
# This should match your number of CPUs
innodb_thread_concurrency = 4
# If you have lots of RAM, you can increase the innodb_buffer_pool_size
innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 10M
innodb_file_per_table = 1
innodb_file_io_threads = 1
innodb_max_dirty_pages_pct = 70
Backup then either replace
/etc/init.d/mysql with the attached version or use the patch to run the MySQL databases and checkout directory from RAM in tmpfs. Make sure the result init.d mysql script is still chmod 755. As of November 13, 2009, it takes about 71MB of space in /var/lib/mysql to run a basic test of Drupal 7 core, so keep that in mind if you change the tmpfs allocations provided in the setup patches.
Then execute the following so you can keep your Drupal configuration as long as you do clean starts and stops of MySQL.
chown -R mysql:mysql /var/lib/.mysql
chown -R www-data:www-data /var/www/sites/default/.files
rm -r *
Once you are in a final configured state, you might also want to create a /var/lib/.mysql.bak directory for storing a working copy of your database files. There are cases where mysql could fail to start, then it could copy nothing from the empty /var/lib/mysql directory to the stateful /var/lib/.mysql copy.
htop, which was installed as part of the recommended deb packages.
The next cron on the client should start a self test. If the self test succeeds, it will start testing patches from the project server. The client will list the number of test assertions it has completed for a test at admin/pifr. Note the client will run a complete cycle of patch testing twice before becoming enabled for project patch testing. The first it to make sure the client correctly catches an intentional breakage of the checkout. The second is to make sure a clean checkout has no failures or exceptions.
mysqladmin -u root -p drop drupal_checkout
mysqladmin -u root -p create drupal_checkout
rm -r /var/www/sites/default/files/checkout
I occasionally got "When requesting next test, server responded: Invalid server" errors on my client when I did have the right API key, so I altered the client xmlrpc file to include some extra debugging calls to watchdog. After many long tests, I realized my server was going beyond the default 45 minute limit set on the server to timeout a runaway test. I increased it to 200 and finally passed. If your client exceeds 20 minutes per test, it is probably undesirable as a production testing server.
Make sure your php.ini files for cli and apache have the following set, otherwise the client might have fatal errors that prevent it from completing all the tests.
display_errors = On
log_errors = Off
;error_log = syslog