Title: Amazon EC2
Date: 2014-01-11
Category: Tools
Tags: EC2, Tools, Virtualization
Author: Zeming Lin

One way to do the assignments for cs4414 is to use an Amazon EC2
instance.  You should be able to do everything you need for this course
using the free tier of EC2.  An advantage of using EC2 is you will be
able to easily set up servers you develop in this class that are visible
to the rest of the Internet.

1. Visit [http://aws.amazon.com/ec2/](http://aws.amazon.com/ec2/) and
click "Create Free Account".  Follow the instructions provided to create
your Amazon EC2 account.

2. Once you are signed up, Click "My Account/Console" on the upper right
hand corner of the screen followed by "AWS Management Console".

3. In the AWS Management Console, click on "EC2" on the left hand
side. You should now be in the EC2 dashboard.

4. Click "Launch Instance".

5. Scroll down and select Ubuntu Server 13.10.

6. *Optional:* Click "Next" twice until you get to the Add Storage menu. Change the size of the server to 30 GB.

7. Click Review and Launch, and then Launch.

8. When prompted for a keypair, 
	1. Coose "Create a New Keypair".
	2. Give it a name like "keypair", and download the resulting pem file. 
	3. Click Launch Instance.

9. Click on the id, which looks like "i-5c..." and note the Public DNS
field of your instance. This is the ssh address you will be using to
connect to your ec2 server, while providing keypair.pem as a key.

10. Open up your favorite ssh client and enter the Public DNS field as
the address to connect to and your keypair.pem as the key.  **Node:** If
you're ssh'ing on UNIX, keep in mind that the permissions for the
keyfile must be set to 400. You can do this with "chmod 400
keypair.pem".

	To ssh in UNIX, the command will be (with your instance address instead of the one used here):

	```
	ssh –i keypair.pem ec2-54-209-195-140.compute-1.amazonaws.com
	```

11. Execute the following two lines in your command shell to install rust:

	```
	wget https://www.dropbox.com/s/ho4bpigv8fdeige/setup-ec2.sh
	sudo sh setup-ec2.sh
	```

<div id="disqus_thread"></div>

<script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'rust-class'; // required: replace example with your forum shortname
	var disqus_url = 'http://www.rust-class.org/ec2.html';

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>


