command-line How-To TechBiz

Setting Up An EC2 LAMP Server


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:


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

And if we go to:

we should see a webserver.

And if we ssh:

ssh -i ec2-keypair

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.