web development

How to install cruisecontrol/phpUnderControl in Debian Lenny

Some time ago, I posted a small tutorial how to install phpundercontrol in a fresh Debian Etch machine. As Debian Lenny is now out for some time I’d like to update this small tutorial for its changes.

The good thing: You don’t need to use backports anymore – the sun-java6-bin/sun-java6-jre packages are available in the lenny non-free tree.

Therefore, the first thing to do is check your /etc/apt/sources.list if it checks for non-free packages (does not per default).

deb http://ftp.debian.org/debian/ lenny main non-free
deb-src http://ftp.debian.org/debian/ lenny main non-free

The rest stays mostly the same:

# update apt to include non-free packages
apt-get update

# install packets (java and subversion)
apt-get install sun-java6-bin sun-java6-jre
apt-get install subversion

# add symlink from /usr/bin/java to /bin/java for the cruisecontrol start script
ln -s /usr/bin/java /bin/java

# install apache (mainly for phpmyadmin) and php5 + cli
apt-get install apache2-mpm-prefork
apt-get install php5 php5-cli php5-dev
apt-get install php-pear make

# install xdebug (needed for phpunit)
pecl install xdebug
echo "zend_extension=/usr/lib/php5/20060613+lfs/xdebug.so" >> /etc/php5/cli/php.ini

# install phpunit and phpundercontrol via pear
pear upgrade --force pear
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear install phpunit/phpunit
pear install --alldeps channel://components.ez.no/Graph
pear install --alldeps channel://pear.phpunit.de/phpundercontrol-0.5.0

# get and extract cruisecontrol
apt-get install unzip wget
cd ~
wget http://freefr.dl.sourceforge.net/sourceforge/cruisecontrol/cruisecontrol-bin-2.8.3.zip
unzip cruisecontrol-bin-2.8.3.zip -d /opt
cd /opt
ln -s cruisecontrol-bin-2.8.3 cruisecontrol

# run phpundercontrol modifications against cruisecontrol
phpuc install /opt/cruisecontrol

# first testrun
cd /opt/cruisecontrol