Posts Tagged web development
Creating Your Online Business: Step by Step Instructions to Buy a Domain, Setup Amazon EC2, and Install Drupal
Posted by Byron Sorrells in Entrepreneurship on July 7, 2010
If you’re wanting to create a new website or take your existing business online, you should be able to do so if you can make it through this post. The steps below give you 100% of control over your entire online presence. If you’re a do-it-yourself type of person, this is for you. If you’re looking for a “turnkey” type of solution, this isn’t it. If you’re just wanting to set up a simple blog, you are better off using Word Press and not following this guide. Please feel free to leave comments and/or ask questions. This is what we’re going to cover:
- Purchasing your domain name (yoursite.com) via godaddy.com
- Setting up Google Apps for your domain — this includes E-mail, Calendar, Documents, Chat, and more.
- Configuring EC2 hosting with an Amazon Web Services account
- Installing and configuring Drupal — an open source content management system
- Configuring Drupal modules and a Drupal theme
- Creating Content
- Setting up E-commerce and an online store with Ubercart (a Drupal Module)
1. Purchase a New Domain Name
The first thing we need to do is purchase an identity on the web. Despite the amazing amount of clutter on their site, I have always used GoDaddy.com to manage all of my domains. They’re the world’s number one domain registrar and their customer service is outstanding. So, if you haven’t already visit GoDaddy.com and buy the domain you’re after.
More than likely, your domain name will only cost you about $10 a year. I highly recommend purchasing the private registration. whois.net is a look up service that displays information about the owner of a registered domain name. I always pay for private registration (an extra $9) in order to avoid spam via E-mail, snail mail, and phone calls.
As you go through the checkout process, GoDaddy will try their hardest to sell you other products such as hosting, SSL certificates, website design services, and much more. Ignore all of this and only purchase your domain name. After your purchase is complete, you should get two E-mails from GoDaddy. You can archive these right away. There’s nothing of any real importance in there.
Go ahead and leave your browser up and stay logged in to your GoDaddy account. You’ll need to change a few things in order to get through the next step — setting up Google Apps.
2. Sign up for Google Apps Standard Edition
By setting up Google Apps for your domain, you will have E-mail, calendar, document, and chat services — all free! In other words, you can have a your.name@yoursite.com E-mail address.
- Open a new browser window (keep your GoDaddy account up)
- Visit http://www.google.com/a/cpanel/domain/new
- Choose “Administrator: I own or control this domain”
- Enter your domain and click “Get Started”
- Fill out the form and press continue
- Set up the administrator account and press continue
- In order to verify ownership, choose “Change yoursite.com CNAME Record”
- Get to the main dashboard of your GoDaddy account — https://mya.godaddy.com/
- On the left hand side, click on “Domain Manager” underneath “My Products”
- Click on your new domain name
- Look for a link titled “Total DNS Control” and click on that

- On the right hand side of the page, click on “Add New CNAME Record”
- Where it says “Enter an Alias Name” — cut and paste the string from Google. It should like something like googleffffffffb89759cf
- Where it says “Points to Host Name” — put google.com
- Leave the TTL at 1 Hour

- Click on Create/Okay. You should get a message that says, “Record successfully created.”
- Close the pop out box (but leave the GoDaddy Total DNS page open) and go back to the Google Apps setup page and click, “I’ve completed the steps above.”
- You can go through the Launch Guide, but you don’t need to. Click on “Skip this Guide”
- You should now be at the main dashboard for your Google Apps account.
Setting up E-mail
- From the dashboard, click on “Activate email”
- Google will show you instructions for GoDaddy.com
- If you still have your Total DNS page up at GoDaddy, you should see MX Records at the bottom of the page. MX stands for Mail Exchange.
- There should be two existing records there.
- Regardless of how many are there, click the red circle with white X and delete all existing MX records.
- Once you’ve deleted all existing records, click Add New MX Record. The MX (Mail Exchangers) Record Wizard will appear.
- For each MX Record, enter information according to the data in the table below:
- For the Select the Priority Value drop-down menu, enter the priority value.
- For Enter a Host Name, leave the default setting to @.
- For Enter Goes To Address enter the Google server name in the table below. Be sure to include the trailing dot at the end of each record.
- For the Select TTL Value drop-down menu, enter 1 Week. This will appear as 604800 seconds within the DNS system.
| PriorityValue | HostName | Goes To Address (Mail Server) | TTL Value |
|---|---|---|---|
| 10 | @ | ASPMX.L.GOOGLE.COM. | 1 week |
| 20 | @ | ALT1.ASPMX.L.GOOGLE.COM. | 1 week |
| 30 | @ | ALT2.ASPMX.L.GOOGLE.COM. | 1 week |
| 40 | @ | ASPMX2.GOOGLEMAIL.COM. | 1 week |
| 50 | @ | ASPMX3.GOOGLEMAIL.COM. | 1 week |
Once you’ve entered the 5 MX Records, you can go back to the Google Apps setup screen and click on, “I have completed the steps above.” You should now be back on the Dashboard.
If you want to create other users and give them E-mail addresses as well, you can click on “Create new users.” There are other configurable options within Google Apps, but nothing else is essential. You can change the color scheme and add your logo to make it a more personal experience for you and your team.
Go ahead and keep your new E-mail account open and keep your GoDaddy account up as well. You’ll continue to need both of these for the next step.
3. Configure EC2 Hosting with an Amazon Web Services Account
If you don’t already have an account with Amazon, that’s okay. We’ll make one. Visit http://aws.amazon.com/ and sign up for an account. You’ll have to enter a form of payment up front. EC2 hosting charges by the hour, so you won’t be charged up front for anything. Amazon bills at the beginning of each month for the services used in the previous month.
Amazon EC2 instances are high powered servers that are fully customizable. This is not for the weak or faint of heart. You’ll be typing a few commands into a “black box” — there’s no pretty interface for some of the following tasks. It’s painless, though! Don’t stop here…
After you are signed up and signed in:
- Visit the EC2 Management Console at https://console.aws.amazon.com/ec2/home
- To start using Amazon EC2 you will want to launch a virtual server, known as an Amazon EC2 instance.
- Click on the “Launch Instance” button.
- A pop out box dialog will appear with a lot of instances to choose from.
- My favorite is the “LAMP Web Starter (AMI Id: ami-2cb05345)”
- Click the “Select” button to the right
- Leave all of the defaults — Number of Instance: 1, Zone: No Preference, Type: Small (m1.small)
- Leave the radio button selected to “Launch Instances” — don’t select “Request Spot Instances”
- Click Next. Leave the defaults for Kernel, RAM, Monitoring, and User Data. Click Next.
- Now, you’ll need to create a new “keypair” — this is used to connect to the server to FTP files and make changes to you server
- Type a name for the keypair and then click on “Create and Download your Keypair”
- You should get a dialog box from your browser to save the file. It should have a .pem extension. Save this somewhere safe and in a place that you’ll remember where to find it!
- Create a new security group — you can name it “web” and the description can be “web”
- You can leave the defaults — SSH, MySQL, and HTTP
- You can add HTTPS if you plan to purchase an SSL certificate and/or run an online store
- Choose “Continue” and then review your Instance Details. You should have something that looks like this:
If all looks okay, click “Launch” — You should get a message stating, “Your instances are now launching.” Within this box, you should have an option to “Go to the Elastic IPs Page.” Go ahead and click on that.
At the top, click “Allocate New Address”
Click on your new address and then click on “Associate” above. The instance that you just created should be the only option. Click “Associate” — this will create a permanent IP address for your new server. This way, you will always have the same address, even if the machine reboots or you need to create another instance later.
Take note of your IP address. Go ahead and highlight it and copy it to the clipboard (or write it down).
Point Your Domain Name to Your Hosting
So, now you have a domain name — yoursite.com — and you have a brand spankin’ new server with Amazon that’ll cost you about $70 a month — trust me… it’s worth it.
At the moment, if you visit your yoursite.com, you’ll be taken to a GoDaddy temporary page. There are no files associated with yoursite.com — we’ll be getting to that shortly. We’re going to make one more change within the Total DNS Records at GoDaddy in order to point yoursite.com to your new IP address and server at Amazon.
- Get back into your Total DNS Control page at GoDaddy
- Locate the A Name record at the top of the list
- Click on the Edit button (white icon with a pencil) off to the far right
- Change the IP address to your new Amazon IP that you wrote down or copied to the clipboard.
In a very short amount of time — usually within minutes — you’ll be able to go to yoursite.com and you will be directed to your new Amazon server!
3. Connecting via SSH to your new Amazon EC2 Server Instance
Alright, for those of you using Linux, I’m sure you already know how to SSH to a box. For anyone using Windows, there are a few simple steps to take. First of all, you’ll need SSH clients to connect to your server.
Download Free Software
- Download WinSCP, a free SFTP client for Windows.
- Download PuTTY, a free telnet/SSH client for Windows.
- Download PuTTYgen, a free RSA and DSA key generation utility.
Generate PPK File
- Open PuTTYgen
- Click the “Load” button and select your keypair.pem file that you saved earlier from Amazon
You should get a message that says you successfully imported your key.- Click OK
- Click Generate
- Click Save private key
- You will be prompted with a message that says, “Are you sure you want to save this key without a passphrase to protect it?” Answer Yes.
- Save your file as keypair.ppk (I like to keep my .pem and .ppk files with the same name — just different extensions).
- Now you can close PuTTYgen — you won’t be needing that any more.
Connect with PuTTY
- Open PuTTY
- In the left hand column, underneath the Connection option, expand the SSH option and click on “Auth.”
- Browse for the keypair.ppk file that we just made.
Leave all the other defaults.- Now, click “Session” in the left hand menu.
- Type in “root@ipaddress” in the Host Name area — where the IP address is your Amazon Elastic IP that we took note of earlier.
- In the Saved Sessions area, give this connection a new name.
- Click Save
- Then, you can either double click on your new saved session or you can click on Open at the bottom.
If all goes well, you should see a nice looking box like this.
- Go ahead and change directories to where our web documents will live
-
cd /home/webuser/helloworld/htdocs
- Leave that alone for a minute — we’ll come back to that.
Connect with WinSCP
- Open WinSCP
- Click New on the top right
- Enter in the values like in PuTTY and browse for your PPK file
Click Save and name your new connection.- Now, you can double click on this connection and create a new FTP session — this is how we will actually transfer files back and forth. If all goes well, you should see something like this:
The right side of WinSCP is your Amazon server.- The left side of WinSCP is your computer.
- You can navigate the Amazon box by clicking on the “..” at the top. That takes you up one level to the root directory “/”
- Double click on home, then webuser, the helloworld, then htdocs
- Now we’re in the same directory as our PuTTY window.
4. Install and Configure Drupal
Okay, we’re getting closer to the fun part. This is where we’re actually going to install Drupal, an open source CMS platform.
- Go to http://drupal.org/project/drupal and download the latest version of Drupal 6 (as of today, it’s version 6.17)
- The files come compressed in a tar.gz file.
- Extract those files into a directory on your local computer. It should look like this:
Within WinSCP, browse to the Drupal files on the left side of the program (your local computer).- Once there, highlight all of the files and drag them into the htdocs folder on your Amazon server.
You can find step-by-step Drupal installation instructions at http://drupal.org/getting-started/6/install/download — but I’ll give the rapid fire version here.- In your PuTTY window, type “mysql” at the command prompt.
- You should now have a “mysql>” prompt. Type the following (note the semi-colon):
- mysql> CREATE DATABASE drupal6;
- mysql> GRANT ALL PRIVILEGES ON drupal6.* TO ‘web_user’@'localhost’ IDENTIFIED BY ‘thepassword’; (create a difficult password and write it down)
- mysql> SHOW DATABASES;
- You should now see a few databases — including drupal6. We created a user named web_user and game it access to the drupal6 database.
- If you transferred your files properly, you should be able to go to yoursite.com/install.php
- You’ll need to create the settings.php file.
- In WinWCP — browse to the /home/webuser/helloworld/htdocs/sites/default directory. You should see a file called default.settings.php
- Make a copy of that file and name it settings.php
- Now refresh the install.php page in your browser.
- You should see the Drupal installation screen.

- Once the installation is complete, we can begin to add on to Drupal.
Before I go any further, I want to call out a couple of books that really, really helped me understand Drupal and become proficient at using it.
I highly recommend both of these. They will make your life much, much easier and you’ll experience many “Aha!” light-bulb-going-off type of moments.
After getting Drupal installed, the very first thing I like to do is install the Admin Menu module. Modules are contributed bits of code that account for a lot of functionality within a site. The Drupal core is a very basic framework. Modules build on top of the core and do all sorts of things ranging from E-commerce, Twitter integration, Facebook Connect integration, CAPTCHA spam blocking, etc. The list is endless.
This is a great tutorial on how to install contributed modules: http://drupal.org/getting-started/install-contrib/modules
It’s really pretty easy:
- Google what you’re looking for “drupal admin menu”
- Go to the module’s page http://drupal.org/project/admin_menu
- Download the tar.gz file
- Extract it locally
- Upload it to the /home/webuser/helloworld/htdocs/sites/all/modules directory (you may have to create this if it doesn’t exist)
- Go to the yoursite.com/?q=admin/build/modules page and enable the module
- If you successfully did this for the Admin Menu module, you should now see a black menu strip at the top of your Drupal site.
Commonly Used Drupal Modules
First, I go in and enable some of the optional modules that come with the core:
- Comment
- Contact
- Help
- Path
- Profile
- Search
- Statistics
- Taxonomy
- Update Status
Then, I upload and enable some of the most widely used contributed modules.
- Views
- CCK (Content Construction Kit)
- Token
- Pathauto
- ImageAPI
- FileField
- ImageCache
- ImageField
- Date
- Google Analytics
- Webform
- CAPTCHA
- AddThis
- AJAX Comments
- Login Toboggan
- Ubercart (for E-commerce)
- Lighbox 2
I strongly advise against uploading all the modules at once and enabling them all at once. Start with CCK. It is integral to any site built with Drupal. It helps expand your content types and make rich pieces of content that include images, links, videos, and more. After that, move on to views. Views and CCK work hand-in-hand. There are many tutorial videos for helping you learn how to get the most out of CCK and Views.
Drupal Themes
You can think of the Drupal core as the concrete foundation and walls of a home. you can think of Drupal Themes as the paint and wallpaper. Take a look at http://themegarden.org/drupal6/ — this is a site that lets you scroll through various themes. The Drupal core code base never changes — the only things that change are the CSS and template files.
Just as you can download contributed modules, you can download contributed themes here: http://drupal.org/project/Themes
There’s a full tutorial about them here: http://drupal.org/getting-started/install-contrib/themes
It’s very similar to uploading and enabling a module.
- Go to the theme’s page http://drupal.org/project/acquia_marina
- Download the tar.gz file
- Extract it locally
- Upload it to the /home/webuser/helloworld/htdocs/sites/all/themes directory (you may have to create this if it doesn’t exist)
- Go to the yoursite.com/?q=admin/build/themes/select page and enable the module (you can get there via the admin menu: Site Building –> Themes)
- Enable the Acquia Marina theme and set it to be the default
- If you successfully did this, your entire site should be themed differently now.
- All of the CSS and .tpl.php files are modifiable.
- More often than not, you can get by with just a few modifications to the CSS to make it match the color scheme of your business.
- If you go to Site Building –> Themes –> Configure you will be able to make all sorts of changes to the theme. You can upload your logo and favicon amongst other things.
You can also purchase themes that are more suited to your needs. I am a big fan of Top Notch Themes. I have used several of their themes. They are nicely documented and offer a lot of configurable options.
At this point, we have our domain, Google Apps, hosting, and full Drupal installation set up. If you’re still reading and following along, nice job! Hopefully you’re not pulling your hair out. At this point, we’re missing the main element — CONTENT.
Drupal makes it really easy to create content. Let’s create some.
4. Create Content Within Drupal
From the Admin Menu, hover over Content Management and then click on Create Content.
At this point, you only have two content types — a page and a story. These are essentially the same. Think of nytimes.com. A page for them might be their privacy policy page. A story for them would be a news story.
Let’s create a page. Give the page a title. Write some text in the body. Click publish at the bottom.
You’ve just created a page that is now live on the Internet. Creating content, configuring content types, and displaying content is enough for a completely separate post — so I’ve decided to put that information in a separate post (coming soon).
5. Setting up E-commerce and an online store with Ubercart (a Drupal Module)
I decided that Ubercart also deserves its own posting. There’s just too much. If you’ve made it this far, take a break and come back tomorrow soon, I’ll post the Ubercart instructions ASAP.
Things in General
Posted by Byron Sorrells in Miscellaneous on May 28, 2009
There’s a lot going on right now. I’m not really sure what it all adds up to, though.
I’m working on three web development projects outside of my job (nycgo.com). All three are for friends and family. All three are for free! I’m really happy to help my friends and family. I’m enjoying the opportunity to work on three completely different types of web sites. It doesn’t leave much time other things. I’m doing my best to strike a balance between work, my own work, the gym, going out, and spending time alone relaxing.
While at lunch today, I sent a Twitter update via my iPhone which automatically updated my Facebook status. Is that not completely insane? Think about how long the world has been around, and think about what you were doing 15 years ago. I was playing basketball in my driveway and dialing into the AOL. Only my grandmother had a cell phone and it was the kind that Zack Morris had.
The messasge I sent to Twitter said, “I hate midtown lunch prices.” My boss agreed with me and wrote back, “Understatement of the day. RT @jbsorrells: I hate lunch prices in midtown.” Immediate after that, @MidtownLunch wrote, “RT @vinny49: Understatement of the day. RT @jbsorrells: I hate lunch prices in midtown.” I’m not entirely sure what all of this means, but it seems very interesting. I’m starting to understand the potential power that Twitter has and how it has changed the way information is dispersed. I’m becoming more and more interested in actually putting effort behind building a following.
It’s raining and gross out. I have no real interest in getting back out tonight, but I will eventually. A friend is having a leaving party. Since I’m not drinking for now, I’m hesitant to go, but I’m sure it’ll be fine. I successfully stayed out until 3 a.m. last Saturday night – stone cold sober. It’s getting easier and easier.
I’m still amazed at myself that I’m writing things that anyone can read.




