Tuesday, 29 November 2011

Getting a Drupal site up fast - Drupal 7

Drupal 7 Essential Training—Getting a Drupal site up fast  - Tom Geller 

You've probably looked at the dozens of videos in this course and said:
"whoa! wait a second. I just want to get my site up".
This video gives you only the most bare instructions to get a Drupal site running, and then tells you which other videos to watch for more help.
There are basically three steps.
  1. 1st, we'll download and install the Aquia Drupal Stack Installer, also known as DAMP. [or "dev desktop"]
  2. 2nd we'll download and install Core Drupal - that's the Drupal you get from Drupal.org -  into that DAMP.
  3. 3rd, we'll run Drupal's browser-based installer. And that's it! Then we'll be ready to add content and administer our site.
Now, along the way, I'm going to do this very very quickly, and in fact I have already down-loaded some of these files and un-compressed them. If you have any problems with these steps, see the computer literacy course by Garrick Chow, also on Lynda.com.
1: Stack Installer
But - let's get started. Our first stop is at http://acquia.com/downloads Here we get started by looking over here for the platform we're on. Here we're on Windows so I just click "download now" and save it. That'll take a few moments. We then go to our download location which in my case is the desktop, and double click the file that's been downloaded there [which shows as a blue droplet]. Your computer may throw-up a message that warns you about installing a program from the internet. In this case, I know we want to do it so I click "yes".

That launches the Drupal Stack Installer. I'm just going to click through this. You really don't have to change any of the defaults.  I'll explain what they are in a later video about installing the Drupal stack installer.

Finally we get to the stage where we're finally going to name our site. We're actually going to replace the version of Drupal that's installed by the Acquia Stack installer, so it doesn't matter what we put here. Still, for consitancy, I'll say
  • User name is admin, and
  • Password, as it is throughout this course, is drupal. You of course will use whatever password you prefer. And an email address. And then click next.
You get a confirmation screen, click next again, and then one more time to install the Stack installer. This process will take a few minutes ... and we're done! Click Finish.
2: Core Drupal
That launches the control panel for aquia Drupal. So that's our first step completed. Now we want to grab core Drupal, and import it into this stack. To do that, we go back to our web browser, and go to http://drupal.org/project/drupal Scroll down on this page until you get down to the downloads area. Now: I'm making this video before the official release of [Drupal version]7.0 so I'm going to download this one. However, by the time you see it, you'll probably see a 7.0 or a 7.something version of it up here in the green area, and that's the one that you should download.

I click here to download. I've already done it, and the download is on the desktop. So I'll go there, and I'll start the import process.

So there's our Drupal folder after its been un-compressed. If you have any problems with that, watch Garick Chou's videos on computer literacy, also on Lynda.com . I'm going to rename that folder "Two Trees". That goes-along with the name of the site that we'll be building throughout the course, which is about a fictional olive oil company called Two Trees Olive Oil.

Once we've renamed the folder, I go back into my control panel. Go to Settings. And Sites. And Import. (The button opens a file listing of the hard disc). I find that folder (Drupal, renamed Two Trees) and click OK.

Create a new database. I'll call that "Two Trees" as well. And call the server "Two Trees". And click Import.
3: Drupal's Browser-based installer
Doing so launches our browser, and starts the third stage of our installation process, by opening Drupal's own installer. Click Save and continue, and continue-on. Again, I will go through all these steps individually in a later video. Finally we add a little bit of information about the site, including the primary - what's called the Super User. I'll call this Two Trees Olive Oil. Put in a little bit of other information. Finally click Save and continue. And that takes us to our completely installed Drupal site. Click on Visit your new site, and we are done!

Now you can start adding content to your new site, changing the design, managing users - basically doing everything it takes to make this site your own.

If you just need a quick and dirty way to get started, see the video Learning Drupal's Basic Workflow. Then, once your site is ready on your laptop or desktop computer, you can move that installation to a server, which you'll learn about from several videos entitled Installing Drupal on a Server.[note: you need to re-start the program from Windows > Start > Acquia Dev Desktop or such each time you re-start your computer.]

Importing Commerce Kickstarter into Aquia Drupal desktop.

There is a video by Tom Geller of Lynda.com about this, but I lost it and got a 1 week pass on Lynda.com fo
Installing Drupal Commerce using Commerce Kickstart

The free forever video is http://www.youtube.com/watch?v=rubREehi7qY
Install Aquia Drupal desktop, which no mysteriously works. I remember something about using the Zip version on the right and not the more compressed Tar version on the left of the download page because of a windows bug.

Unzip Drupal Commerce Kickstarter, which is a full version of Drupal with an extra shop bit, and name it something nice like "Two Trees" for a fictional Olive Oil Company in California.
Next, open the control panel of Aquia Drupal desktop from the start menu, and click-about on it till you find an "import" button. It's under settings>Sites>Import.

An "Import Site" form pops-up with boxes to fill in:
"codebase": Two Trees
"database" Click the option to create a new database, and name it Two Trees. A spare box dissapears.
"domain server": change "localhost" to "two trees". Ignore the other boxes under "domain server".

On the video, a Drupal install starts at this point with options of plain drupal or this Kickstarter thing.
On my screen, an error message pops-up reading

"hosts file doesn't exist or is not writable/ 'C:\WINDOWS\System32\drivers\etc\hosts' "

Googling for answers I found one on the linked page:

"Windows only" go to:

Posted on July 19, 2010 - 7:48pm by Ouail E..
"Windows only"
go to: C:\windows\system32\drivers\etc
locate the hosts file, right click it, click properties, un-check Read only, create your new site via the Acquia CP.
when all done, go back to the hosts file and check red only.
should work fine.

 Clicking from the My Computer link, I found there really is a file called HOSTS in one called ETC, and right clicking allows a change to writable from read only.

Bizarrely, it works: a set of Drupally forms appears and a site is set-up. I chose not to install a mail server with the Aquia Drupal Desktop, which could be why there's an error message:
  • Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in DefaultMailSystem->mail() (line 76 of C:\temp\veganline\modules\system\system.mail.inc).
  • Unable to send e-mail. Contact the site administrator if the problem persists.

I will pretend I didn't see that because underneith it says Congratulations, you installed Drupal Commerce!  - and has a link to visit the new site on my hard disc.

The new site wants some updates, and knows where to get them. They download straight into the site which swallows them a lot more smoothly than my Drupal experiments crammed onto shared hosting. Those ones often run-out of memory during an update and need a few goes with the alt-backarrow keys and repeated tries before the update works. This manages all the updates at once without a hitch. Except for updating Drupal Core which is more manual. This is a warning transcribed from the video while I still have a free subscription.

Now for you experienced Drupal folks, I want to show you something very quickly about how Drupal Commerce sets things up. It's a little different from how standard Drupal does things, and that means you have to watch out when you update your site. To show you that I'll go back to my [hard disc] and open up my [kickstart] folder.



---- SITES Now normally in Drupal, all the information that's specific to your site is in this Sites folder here....

...it would be in Modules, and then "Modules" would contain the modules, but you don't see them here. This is because Kickstart is a profile: All of the information is stored in 

Now I'm talking about the things that are specific to Commerce Kickstart - the modules, and the way that it is set-up - and if we open this PROFILES/MODULES folder, we see all of this extra stuff. In fact the PROFILES/MODULES/COMMERCE folder contains all the stuff that is specific to Drupal Commerce.

I mention this because if you try to update the site the normal way, by just replacing everything except for the SITES folder, you will actually loose all of your commerce functionality, so be careful about that.

The video doesn't say which other folders to keep. Presumably the PROFILES/MODULES/COMMERCE one.

Sometimes it works; sometimes it doesn't

Chernobyl control room No. 4 in 2000. From Wikipedia. Author?
Here's the system for installing installers.
  • Press control+alt+delete to reveal a list of what's running on your computer.

  • Right-click and turn off random things (do not do this if working in a nuclear power station or it might go funny like the one on the right)
Miraculously, both Aquia Drupal and Bitnami worked today, and this is the only explanation I can give.