Mike November

Phonetic alphabet for my initials, k?

Viewing entries posted in December 2010

Building a development environment

Posted by Marcus Nyeholt on 14 December 2010 | 0 Comments

Tags: ,

I've just been through the process of setting up a development environment in a VM image, suitable for getting in and working with SilverStripe projects. I'll be making the VM available (though where I'm not too sure just yet), but in the meantime, figured I'd dump a list of the commands I run through.

This is Ubuntu 10.10, though the equivalent for other OSes should work (except of course Windows variants)

apt-get install apache2  php5  php5-sqlite  php5-tidy  php5-ldap  php5-mcrypt  php5-geoip  php5-curl  php5-xdebug  php5-pspell  php5-mysql  php5-gd  php5-dev  build-essential  git  gitk  meld

# Default mysql root pass is p455 in the VM
apt-get install mysql-server-5.1
apt-get install subversion
# Note that the following need the "Partner" repositories enabled for ubuntu
apt-get install sun-java6-jre
apt-get install sun-java6-jdk
# Download the netbeans beta
chmod +x netbeans-7.0beta-ml-php-linux.sh 
./netbeans-7.0beta-ml-php-linux.sh 
cd /etc/apache2/
a2enmod rewrite
apache2ctl restart
# Changed the default site config - see below for that
vim sites-enabled/000-default 
apt-get install php-pear
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
# Need specific version of phpunit
pear install phpunit/PHPUnit-3.4.0
pear channel-discover pear.phing.info
pear install phing/phing
# Need to enable remote debugging, see below for config
vim /etc/php5/conf.d/xdebug.ini

The 000-default config file:




        ServerAdmin webmaster@localhost

        DocumentRoot /home/developer/www
        
                Options FollowSymLinks  
                AllowOverride None
        
        
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

And the xdebug.conf file


zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000

0 comments | Read the full post