Lab 6: Drupal Jumpstart

20 points

In this lab you will set up set up an additional Drupal website on your virtual machine, to be used for your term project, at the URL, where mylogin is replaced with your login. You'll also continue the configuration of Drupal for your lab server,


    Set up a new drupal site

  1. Enable Clean URLs for your website. This requires telling Apache2 to allow the use of .htaccess files (such as /var/www/html/.htaccess) to set configuration options. To do so, cd into the /etc/apache2/sites-enabled directory and edit the default site configuration file, 15-default.conf. In the <Directory "/var/www/html"> section, change "AllowOverride None" to "AllowOverride All". Restart apache and enable Clean URLs in the Configuration administration menu.
  2. Configure apache to support an additional virtual host with domain name (Can you figure out how to do by looking in the /etc/apache2/sites-enabled directory before you read the details?)
  3. Set up a new Drupal website for the domain name. You'll have to create a new mysql database called drupal_project and give your drupal7 user permissions on that database. You'll also have to create a new directory in /var/www/html/sites called with its own settings.php file. (See if you can figure out how to do these things by reviewing lab 5 before you look at the details.)

    Continue configuring your server

  4. Drupal needs to be able to send email to users—for example, to send them an initial password. Your ubuntu machine is not initially set up as a mail server. To set it up, use apt-get to install the mailutils and postfix mail server package. If postfix wasn't previously installed, you'll be asked some configuration questions. Set up your server as an "Internet site". You will be asked for the fully qualified domain name. Use the domain name I set up for your lab server—
  5. Test your mail server by typing "mail youremailaddress" and sending an email to yourself. Note that to end the body of the mail message, you can type control-D.

  6. Drupal also needs to have its cron jobs run every hour. Add a cron job using wget to call cron.php every how following these instructions. You'll actually need to add two lines to your crontab file, one for and one for
  7. You will probably have to increase the memory limit for php in your settings.php file. 128MB should be enough for just about any modules you wish to add. Basically you will edit /var/www/html/sites/default/settings.php and add the following at the end of the file:
    ini_set('memory_limit', '128M');
    Also make this change for your development site. If you want them, you can get detailed instructions here.
  8. Visit the drupal website and view available themes. Select a theme for your proj server that might be appropriate for your term project. Install it on your server. (Your lab website should use the default theme.)
  9. Set up your lab website

  10. Log in to your lab site using the administrative account you created when you set up the site and enable the path module if it isn't already enabled.
  11. Create a basic Web page with a bit of information about your lab site using Add Content -> Basic Page. Use the title "My lab website" and some text in the body. In the publishing options section, select the option to promote it to the front page.
  12. Enable the Forum module. Click "configure" to add an additional forum container. Add a forum in it. Then add a forum topic inside the forum. Check out the URL /forum to make sure that it worked correctly.
  13. Configure your main menu with at least two entries: Home and Forum
  14. Create an "About" page for your site with some made-up information about your site, such as "This is Harry Plantinga's lab website for IS 337". Set the URL path to about before saving the page.
  15. The contact module lets you set up forms where users can contact the site managers by email. Enable the contact module, and then configure it and click "Add Category." Enter a category "Contact Us" and add your email address in the recipient box. Configure it to send an email that says "Thanks for your feedback. We'll get back to you as soon as possible." Make it the default. Now check it out by visiting the page /contact.
  16. Configure the blocks on your web site with Structure -> Blocks. Remove the "Powered by Drupal" block in the footer. Add "Who's new" and "Active forum topics" blocks to a sidebar.
  17. Add a new role to your website of editor at People -> Permissions -> Roles. Editors should have all the permissions on Comment, Contact, and Forum, and in the Node section, all permissions except the first three, which have warnings.
  18. Figure out how to add links for the About and Contact pages, centered in the footer block.
  19. In these labs and in your term project, you'll be making changes to your websites that have the potential to break them. We're going to use git, a version control system, basically as a backup for now.

    Once your sites are running, initialize a git repository for your /var/www directory:
    cd /var/www; git init
    Commit your current /var/www directory with
    git add *
    git commit -m "Initial commit"

    Repeat the last two commands (with a different message) every time you want a new backup.

Note: you'll be doing similar things to your project site for the term project. With your partner you should decide to use one of your dev sites or the other and both work on the chosen one. Then work with your partner to configure that site appropriately. It will be due at the next checkpoint. Although you need only one site for the pair of you, you should both go as far as setting up the basic development site and install a theme (i.e. complete this lab).

Turn In

I will check that your lab and development sites both work, using the links on the projects page. I'll check your lab site web site for the menus, pages, blocks, and other requirements of this lab.