My development environment so far
Submitted by clemens on Fri, 2008/08/22 - 1:40pm
Intro
These are my notes when doing my first (drupal) presentation @ FrOSCon 2008 Drupal Room This method uses the concepts- All drupal sites in directory www
- All site-config in a separate directory
- All site-data in a separate directory
Add new local domain
Why do I need this? To make sites like http://nf.test http://nf.dev or http://froscon.demosudo su -
echo 127.0.0.254 froscon.demo >> /etc/hosts
exit
add apache site
We need a new website with a configured drupal install somewhere. Key words are VirtualRoot and DocumentRoot. This is my template TEMPLATEsudo 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
exit
Let apache know of the new site
a2ensite froscon.demo
/etc/init.d/apache2 reload
exit
Installing drupal
cd /home/clemens/www
Get and unpack your drupal version
cd /home/clemens/usr/lib/drupal/core
wget http://ftp.drupal.org/files/projects/drupal-6.4.tar.gz
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 youchmod 777 settings.php
and then reset it again
chmod 755 settings.php
install drush
cd /home/clemens/www/site-config/froscon.demo/modules
wget http://ftp.drupal.org/files/projects/drush-6.x-1.x-dev.tar.gz
wget http://ftp.drupal.org/files/projects/drush_mm-6.x-1.x-dev.tar.gz
tar xzf drush_*
http://froscon.demo/admin/build/modules
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
http://froscon.demo/admin/build/simpletestvi ~/www/sites-config/froscon.demo/settings.php
http://froscon.demo/admin/build/simpletest
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
eclipse
- a test from node_factory - mylyn task trackingAttachment | Size |
---|---|
TEMPLATE.txt | 434 bytes |
new-site.php_.txt | 2.21 KB |
new-db.php_.txt | 451 bytes |
drush.txt | 581 bytes |