Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Intro to Drush

2.017 visualizaciones

Publicado el

Publicado en: Tecnología
  • Sé el primero en comentar

Intro to Drush

  1. 1. An Introduction To Drush<br />Steven C Jackson<br />Roger Soper<br />
  2. 2. OS Solutions<br />OS Solutions began in early 2009 as a one-stop computer shop<br />Evolved to be Drupal Consultants and Software Engineers<br />Several years of Drupal experience and nearly a decade of PHP experience<br />All solutions are open-source<br />
  3. 3. Vitae<br />Steven C Jackson<br />Bachelor’s Computer Science<br />Finalizing Master’s Computer Science<br />Red Hat Certified Technician<br />Free Software Foundation Contributor<br />Wrote BASH.ED (CC licensed, also free in PDF format)<br />Linux Nerd<br />
  4. 4. What is Drush?<br />Command Line Utility<br />DRUpalSHell<br />As defined:<br />drush is a command line shell and Unix scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.<br />
  5. 5. Why Use Drush?<br />Great for sysadmins<br />Easy commands<br />Written in PHP  Easily extendable<br />One installation to rule them all<br />Can even use on Windows OS<br />Saves Time<br />
  6. 6. How To Get?<br />Download from<br /><br />Installation is super easy for sysadmins and the average code monkey<br /><br />
  7. 7. Install Overview<br />Download drush [ wget ]<br />Extract it [ tar xzvfdrush-All-versions-3.0-beta1.tar.gz ]<br />Make it executable [ chmodu+xdrush ]<br />Alias or PATH it [ alias drush=‘/path/to/drush’ ]<br />Source or Export [ source ~/.bashrc ]<br />
  8. 8. How to Use<br />Navigate to your site root (or further)<br />cd /var/www/mysite<br />Note: Drush reads sites/default/settings.php for db info<br />Type ‘drush’ to get a list of commands<br />
  9. 9. Common Commands<br />dl<br />Downloads a module or theme<br />Extracts it<br />Example<br />drush dl node_page<br />drush dl zen<br />
  10. 10. Common Commands<br />en<br />Enables a module or theme<br />Example<br />drush en node_page<br />drush en zen<br />
  11. 11. Common Commands<br />cc<br />Clears Drupal Cache<br />Example<br />drush cc<br />Gives you a choice to clear individual cache or all cache<br />
  12. 12. Common Commands<br />sql-dump<br />Performs a mysqldump<br />Example<br />drushsql-dump<br />Don’t forget to redirect your output lest you have it all print to screen<br />Drushsql-dump > out.sql<br />
  13. 13. Common Commands<br />watchdog-list<br />View the watchdog logs basaed on severity levels<br />Example<br />drush watchdog-list<br />
  14. 14. Common Commands<br />Remember there are a plethora of commands at your disposal<br />Just type ‘drush’ at the command line for a list of available options<br />Because drush is extendable some modules or profiles (like Aegir) offer additional functionality<br />
  15. 15. Drush Make<br />Extremely power Drush utility<br />Allows you to wrap up and entire site in a make file and deploy the site basically as a profile<br />Beyond scope of Intro to Drush but worth checking out<br /><br />
  16. 16. Try It Yourself<br />ssh adug@<br />Password: adug!<br />Site path: /var/www/adug/<br />URL:<br />Site un/pw: admin/adug!<br />Temporary server but please don’t go crazy <br />
  17. 17. Topic Suggestions?<br />Meetings 2nd Saturday of every month at 2pm<br />Always at OS Solutions<br />1244-B Jones St, Augusta, GA 30901<br /><br /><br />888-275-4893<br />Videos and Slides available online @ and<br />