Virtual Session: Installing a development environment on your laptop

Since it seems that there are a good number of hands-on sessions proposed, this "virtual" session will serve as a pre-conference preparation. The intent is that people will be able to refer to it to install a development environment of their choice on their laptop so that they can run a Drupal website during the conference.

Matt Kleve has already proposed covering installing Drupal in his session Drupal 101. So, this session will provide only the information to set up the development environment.

Note: this resource is designed as a clearing house for existing information, rather than a source for original content.

Who needs a development environment?
Anybody running a website

What is it?
It is the combination of a web server, database server, language interpreter, and possibly a file server and mail server.

When should you set it up?
As soon as you decide you are going to start building a website

Where do you install it?
On your laptop (or desktop)

Why would you want one?

  • It gives you a place to test things out before you put them up on your production box. It's better to work out the kinks in a test environment than in production!
  • It provides a way for you to do your web site building work whether you have access to the internet or not
  • All the cool Drupalers are doing it

How do you do it?
Check out the information below!

  • First off, there is an entire section in the handbook that covers this. You can find it at: http://drupal.org/setting-up-development-environment.
  • I chose to install XAMPP on my Windows Vista laptop and I followed the directions on this page (which is contained as a sub heading of the previous link): http://drupal.org/node/161975
  • Basically, what you are doing is downloading a compressed file and extracting it onto your hard drive. (Make sure you use the 1.7.1 release and not any of the newer ones.) There is almost no other configuration necessary.
  • The section on Configuring XAMPP may seem intimidating at first, but it is actually quite clear and complete. Take some time to digest the information and it will make sense
  • It's been a long time since I installed XAMPP, so I can't really remember all the stumbling blocks I encountered. But, here are a few things I think you will need to know:
    • The main control panel is located directly under the XAMPP directory. It is called xampp-control. This provides a graphical interface for starting and stopping the different servers. Do yourself a favor and create some type of shortcut.
    • Whenever you make changes to httpd-vhost.conf you need to stop and restart apache.
    • There is an iCalendar hosts file (it has an .ics extension) and just a plain hosts file (with no file extension) in your Windows directory. Use the hosts file without the extension.
  • Once Matt walks you through installing Drupal, there are some additional settings you will want to enter into your Windows (hosts) and Apache (httpd-vhost.conf) configuration files. You can see the samples below to see what things will look like, more or less.

A subset of what is in my Windows hosts file:

127.0.0.1 localhost
127.0.0.1 drupal
127.0.0.1 mei
127.0.0.1 drupal7
#::1 localhost

A subset of what is in my Apache config file:

<VirtualHost *:80>
ServerName drupal7
DocumentRoot "/xampp/htdocs/drupal_head"
ErrorLog logs/drupal7/error.log
</VirtualHost>
<VirtualHost *:80>
ServerName drupal
DocumentRoot "/xampp/htdocs/drupal"
ErrorLog logs/drupal/error.log
</VirtualHost>
<VirtualHost *:80>
ServerName mei
DocumentRoot "/xampp/htdocs/drupal"
ErrorLog logs/drupal/mei/error.log
</VirtualHost>
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/xampp/htdocs"
</VirtualHost>

This proposal is a work-in-progress. While it is not meant to replace the documentation on drupal.org, if there is substantial enough input I will see about adding it to the documentation. Do contribute to it. Here are some ways:

Please feel free to supplement the links and pointers here by adding comments and links to other places in the documentation. The information in this proposal is meant as a discussion starter, not a comprehensive tutorial.

Also, please post your questions in the comments so that we can fill out the information for those new to this whole process.

Skill Level:
Beginner
Track:
Development
Slides:

Lullabot has a whole bunch of

Lullabot has a whole bunch of videos on installing a local server. Navigate on over to

http://www.lullabot.com/ideas/videos?page=2