Launching a fresh Drupal Installation on Linux with Drush

 by jakedimare- March 8, 2011

Care to venture a guess as to how easy it is to launch a fresh installation of the Drupal CMS? Would you guess 50, 25 or 12 steps? How about 8 steps? Believe it or not, that’s right. In this Rackspace Recipe we will review just how easy it is. This tutorial assumes you’re working on a Linux server with the LAMP stack and Drush previously installed. It also assumes you are logged into the shell with sudo permissions.

  1. Navigate to the root web folder by typing: ‘cd /var/www’
  2. Download the latest version of Drupal by typing: ‘drush dl drupal’
  3. Rename the Drupal folder by typing: ‘mv drupal-XXXX newsitename’
  4. Type ‘cd newsitename’ and open permissions for installation with ‘chmod -R 777 . ‘
  5. Create a database in mysql with the name of the site
  6. Update sites/default/settings.php with the correct connection string
  7. Run the install.php file
  8. Change permissions back to 755

Drush is an incredible tool which I could talk about for days, if I fully understood it. This is literally just the tip of the iceberg. To take this one step further…what if you wanted to add a bunch of modules to your new Drupal site? That’s pretty easy too. For instance…you could download an unlimited number of modules using Drush dl (download). Example:

drush dl cck views views_slideshow ctools views_bonus adminrole advanced_help panels admin_menu jquery_update pathauto print nodewords page_title globalredirect path_redirect taxonomy_manager node_import menu_block custom_breadcrumbs ckeditor filefield imageapi imagecache imagefield lightbox2 emfield messaging token webform google_analytics service_links date calendar devel backup_migrate jquery_ui nodequeue context context_reaction_theme views_arg_context cmf content_taxonomy menutrails image

The trick here is to be within the folder containing the site you want these modules to populate.

Related Posts Plugin for WordPress, Blogger...

2 Comments »

  1. I didn’t know that “drush dl” let you download multiple modules at once. Pretty cool! Don’t forget that after installing modules, you may need to run “drush updatedb”.

    Comment by Rick Umali — March 9, 2011 @ 6:26 pm

  2. Thanks Rick! I like your tech blog…

    Comment by jakedimare — March 9, 2011 @ 6:35 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment