My development environment so far


These are my notes when doing my first (drupal) presentation @ FrOSCon 2008 Drupal Room This method uses the concepts
  1. All drupal sites in directory www
  2. All site-config in a separate directory
  3. All site-data in a separate directory
This way an upgrade to another drupal version runs smoothly. Hmmm this was about developer environment.

Add new local domain

Why do I need this? To make sites like http://nf.test or http://froscon.demo
sudo su -
echo  froscon.demo >> /etc/hosts

add apache site

We need a new website with a configured drupal install somewhere. Key words are VirtualRoot and DocumentRoot. This is my template TEMPLATE
sudo su -
cd /etc/apache2/sites-available
cp TEMPLATE.tmp froscon.demo
vi froscon.demo
# :%s/HOSTNAME/froscon.demo/g
# DON'T FORGET TO CHANGE DocumentRoot and log file locations
# :wq

Let apache know of the new site

a2ensite froscon.demo
/etc/init.d/apache2 reload

Installing drupal

cd /home/clemens/www

Get and unpack your drupal version

cd /home/clemens/usr/lib/drupal/core
tar xvf drupal-6.4.tar.gz

create site

This is my new-site.php script.
cd /home/clemens/www
vi new-site.php
# change site name
# change drupal version

php new-site.php | bash

install site

cd ~/www/sites-data/froscon.demo/
cp default.settings.php settings.php 
chmod 777 settings.php

Create the database

This is my new-db.php script.
vi new-db.php
# edit hostname
# :wq
php new-db.php | mysql -u root

Fire up drupal

http://froscon.demo Do as drupal tells you
chmod 777 settings.php
and then reset it again
chmod 755 settings.php

install drush

cd /home/clemens/www/site-config/froscon.demo/modules
tar xzf drush_*

Running wild on the command line

Install my drush script runner to follow along with the commands.
cd ~/www
./drush froscon.demo help

./drush froscon.demo pm install simpletest cck node_factory

./drush froscon.demo mm dot | neato -o ~/froscon/2008/frosdem.png -T png

./drush froscon.demo -s -v mm enable drush_simpletest

./drush froscon.demo mm enable drush_simpletest nodereference

Running simpletest

vi ~/www/sites-config/froscon.demo/settings.php 

uninstall modules

./drush froscon.demo -v -s mm uninstall content

./drush froscon.demo mm uninstall content
rm -r sites-config/froscon.demo/modules/cck/

./drush froscon.demo mm dot | neato -o ~/froscon/2008/frosdem.png -T png


- a test from node_factory - mylyn task tracking
Plain text icon TEMPLATE.txt434 bytes
Plain text icon new-site.php_.txt2.21 KB
Plain text icon new-db.php_.txt451 bytes
Plain text icon drush.txt581 bytes