Categories
command-line How-To TechBiz

Setting Up An EC2 LAMP Server

Pre-requisites:

Now we’re ready to build an EC2 LAMP Server.

cd .ec2

You’ll find that a lot of ec2 stuff happens in the .ec2 directory.

To list the possible servers that you can set up run:

ec2-describe-images -a

I ran

ec2-describe-images -a | wc -l

and got 1477 possible servers. Some are Windows.

Let’s say we see this listing:

IMAGE ami-1539dc7c level22-ec2-images/ubuntu-8.04-hardy-20080205a.manifest.xml

If we want to start up the ubuntu server listed above we just type:

ec2-run-instances ami-5647a33f -k ec2-keypair

And then we run this command:

ec2-describe-instances

We should see either “pending” or the actual instance running with its FQDN listed in the 4th column. An example FQDN is this:

ec2-173-33-159-95.compute-1.amazonaws.com

And if we go to:
http://ec2-173-33-159-95.compute-1.amazonaws.com/

we should see a webserver.

And if we ssh:

ssh -i ec2-keypair ec2-173-33-159-95.compute-1.amazonaws.com

we’ll get the root prompt:
#~

That’s basically it. Now you can go in and mess around with server settings.

In the next blog post, we’ll look at how to save your custom server settings and set up using S3.

Leave a Reply

Your email address will not be published. Required fields are marked *