Wednesday, June 4, 2008

GeoDjango on Slicehost: Getting Started (1 of 4)



Intro


This series of posts describes a relatively inexpensive way of setting up GeoDjango on a server that is publicly accessible. Specifically, I will go over how to setup GeoDjango on a Slicehost VPS slice that is running Ubuntu 8.04 (Hardy). The posts assume you have a local computer running Ubuntu Linux.

References


The setup process was drawn from a variety of other sources. If you need more information on any of the topics, refer to the following pages:
This first post describes the preliminary steps of signing up for a slice and creating a SSH keypair. The subsequent posts will cover the initial configuration of Ubuntu 8.04 LTS, building/installing the necessary software, and creating a test GeoDjango project.

Several of the parameters described in this series of posts are just for demonstration purposes, and will vary for each user. For these posts the following values were used:
  • Slice IP: 11.222.333.444
  • Slice Password: secret
  • Slice Name: myslice
  • Admin user: demo

Getting a Slice


The first step is to purchase a slice from Slicehost. I signed up for the smallest size slice (256MB, 10GB storage, 100GB bandwidth, currently @ $20/month), but these instructions should work for larger slices too (although the free memory stats will differ). After signing up for a slice, you will receive an IP for your slice and a Slice Manager Password.

It's probably too early to tell, but if you find these instructions useful consider signing up using my referral link. If I get enough referral credits, I'll probably upgrade to a larger slice...
https://manage.slicehost.com/customers/new?referrer=947119543


If you need to rebuild your slice (i.e. erase everything and start over) go to: https://manage.slicehost.com/ and login to the SliceManager. Click on the name of your slice, then select Rebuild. Select the '"Ubuntu 8.04 LTS (hardy)" image, give it a name (such as myslice), and rebuild it.

Setting up an SSH Key Pair


The first step for setting up a secure connection between your local computer and the slice is generating a SSH Key Pair. If you end up rebuilding your slice, you can reuse the SSH key pair.

On your LOCAL COMPUTER, type in the following to generate an SSH key pair.
$ mkdir ~/.ssh
$ ssh-keygen -t rsa

This will create a public (~/.ssh/id_rsa.pub) and private (~/.ssh/id_rsa) key files. The public key will be later transferred to your slice.

Ok, that was all of the preliminaries. On to Part 2 - Ubuntu 8.04 Configuration

No comments:

Post a Comment