Best Practices for Beginners

2,298 views

Published on

Focus on setting up your own Drupal website. starting with an empty linux server focusing on using ssh and the command line to communicate with the server. Students will learn to use the few basic commands required to setup a Drupal site (ssh, wget, tar, cp, mv, cd and rm) without getting to complicated. This session will deviate from the norm and setup Drupal preparing a foundation for websites that may need to scale up. We will also look at some best practices not obvious to beginners such as using the all directory and setting up a multisite installation and of course share a list of favorite plugins for starting out.

Published in: Education, Technology
  • Be the first to comment

Best Practices for Beginners

  1. 1. Best Practices for Beginners Creating your own Drupal environment from command line to website
  2. 2. This Session Build our own dev server (Ubuntu, OS X, Windows) Learn the basic Unix commands Download and install Drupal Configure Drupal site Best practices (discussion?)
  3. 3. Developing and Hosting Servers Develop on your computer Local MySQL / Speed Pay someone else $$$ = Speed
  4. 4. Hosted Servers Shared hosting (Dreamhost, GoDaddy, Ed’s House of Janky Jervers) $10+ Virtual Machine Slice (SliceHost, DreamhostPS) $20+ Amazon Elastic Cloud (GetPantheon.com) $70+ Leased Server (Rackspace) $300+ Your own server farm $$$
  5. 5. Command Line Commands ssh (Secure Shell) Sudo cd (Change Directory) cp (Copy) mv (Move) tar (Compress and Uncompress tar.gz) rm (Remove) wget (Web Get)
  6. 6. SSH Secure Shell How we connect to a Unix ssh -l root 192.168.1.11 based or like server modifier -l changes user Command Modifier Username Server Last Login: Wed Jan 6 09:59:11 on ttys000 drupal-command:~ mike$ ssh -l root 192.168.1.11
  7. 7. SUDO Super User Do Allows you to do a command as the superuser or root Not available on shared servers Much better than logging in as root sudo rm important.txt Prior to command
  8. 8. CD Change Directory How we move around the server cd ../ modifier / starts at root directory modifier ../ moves down a directory Command Modifier Last Login: Wed Jan 6 09:59:11 on ttys000 drupal-command:~ mike$ cd /var/pressflow-6/sites
  9. 9. CP Copy How we copy a file or directory Modifier -R recursively copies a directory cp settings.doc settings.old Command Name New_Name
  10. 10. MV Move How we move a file or directory mv pressflow-6.1.5.4 pressflow-6 Command Directory New_Directory
  11. 11. TAR Turns a group of files into an archive Unarchive tar -xvf tar -xvf pressflow-6.14.tar.gz Archive tar -pczf tar -pczf site.tar.gz /sites/mysite.com Command Modifier archive Directory
  12. 12. RM Remove How we delete a file or directory Modifier -R recursively removes directories rm -R /Everything/I/Ever/Made Command Modifier file or path to file
  13. 13. WGET Web Get How we download files from other web servers sudo wget http://launchpad.net/pressflow/6.x/ 6.15.66/+download/pressflow-6.15.66.tar.gz Command Long Long Url
  14. 14. Lets Build A Server OS X Linux (Ubuntu Server) Windows
  15. 15. Good Use for Older Hardware
  16. 16. We Will Assume You have your own box (or Unix based pc/laptop You can be root You can do what you want You HAVE A BACKUP!
  17. 17. Virtual Machines Why mess with your machine? Options VMWare VirtualBox Parallels
  18. 18. Drupal Stack lamp: Linux, Apache, MySQL, PHP xamp: OS X, Apache, MySQL, PHP wamp: Windows, Apache, MySQL, PHP
  19. 19. Acquia Installer + + damp: Drupal, Apache, MySQL, PHP + Point, Click... Drupal
  20. 20. Install Acquia Mac Users must be the initial root account (not a User who has been given admin privileges)
  21. 21. Best Practices for Users Define User Groups Min 3 Unauthenticated Authenticated Administrators
  22. 22. Set Permissions for groups Slowly add permissions to lower User Groups
  23. 23. Where Is It Stored? Drupal root Sites /all directory Your sites directory
  24. 24. Root Drupal Directory /sites is the only directory we work in
  25. 25. /sites Directory /all available to all sites in the install /default your initial site, starting point, location if not doing drupal multi-site install Folder for each other site on the server folder name must match dns name
  26. 26. /sites/default This is where your site is Download modules you are testing to /modules Download themes you are working with to /themes If your site moves to another server all you need is this folder and the database
  27. 27. Pack Up a Site For a New Server tar -pcvf default.tar.gz default
  28. 28. Install a Module Copy the link from drupal.org Paste directly into sudo wget
  29. 29. Install a Theme Same procedure, different directory
  30. 30. Create Your Own Content Types Just because there is a module does not mean you should use it CCK
  31. 31. For the Future Learn Views Learn Panels

×