{"id":489,"date":"2009-01-20T10:12:39","date_gmt":"2009-01-20T18:12:39","guid":{"rendered":"http:\/\/www.codebelay.com\/blog\/?p=489"},"modified":"2009-01-20T10:12:41","modified_gmt":"2009-01-20T18:12:41","slug":"setting-up-an-ec2-lamp-server","status":"publish","type":"post","link":"https:\/\/www.codebelay.com\/blog\/2009\/01\/20\/setting-up-an-ec2-lamp-server\/","title":{"rendered":"Setting Up An EC2 LAMP Server"},"content":{"rendered":"<p>Pre-requisites:<\/p>\n<ul>\n<li>An EC2 account. <a href=\"http:\/\/aws.amazon.com\/ec2\/\">Click on the sign-up for ec2 button<\/a>.<\/li>\n<li>Some version of *nix.<\/li>\n<li><a href=\"http:\/\/developer.amazonwebservices.com\/connect\/entry.jspa?externalID=351\">Download<\/a> the ec2 tools.<\/li>\n<li>Generated an ec2 keypair.\n<\/ul>\n<p>Now we&#8217;re ready to build an EC2 LAMP Server.<\/p>\n<div style=\"background: #000; color: #fff; padding: 5px;\">\ncd .ec2\n<\/div>\n<p>You&#8217;ll find that a lot of ec2 stuff happens in the .ec2 directory.<\/p>\n<p>To list the possible servers that you can set up run:<\/p>\n<div style=\"background: #000; color: #fff; padding: 5px;\">\nec2-describe-images -a\n<\/div>\n<p>I ran<\/p>\n<div style=\"background: #000; color: #fff; padding: 5px;\">\nec2-describe-images -a | wc -l\n<\/div>\n<p>and got 1477 possible servers. Some are Windows.<\/p>\n<p>Let&#8217;s say we see this listing:<\/p>\n<div style=\"background: #000; color: #fff; padding: 5px;\">\nIMAGE   ami-1539dc7c    level22-ec2-images\/ubuntu-8.04-hardy-20080205a.manifest.xml\n<\/div>\n<p>If we want to start up the ubuntu server listed above we just type:<\/p>\n<div style=\"background: #000; color: #fff; padding: 5px;\">\nec2-run-instances ami-5647a33f -k ec2-keypair\n<\/div>\n<p>And then we run this command:<\/p>\n<div style=\"background: #000; color: #fff; padding: 5px;\">\nec2-describe-instances\n<\/div>\n<p>We should see either &#8220;pending&#8221; or the actual instance running with its FQDN listed in the 4th column. An example FQDN is this:<\/p>\n<p>ec2-173-33-159-95.compute-1.amazonaws.com<\/p>\n<p>And if we go to:<br \/>\n<a href=\"http:\/\/ec2-173-33-159-95.compute-1.amazonaws.com\/\n\">http:\/\/ec2-173-33-159-95.compute-1.amazonaws.com\/<\/a><\/p>\n<p>we should see a webserver.<\/p>\n<p>And if we ssh:<\/p>\n<div style=\"background: #000; color: #fff; padding: 5px;\">\nssh -i ec2-keypair ec2-173-33-159-95.compute-1.amazonaws.com\n<\/div>\n<p>we&#8217;ll get the root prompt:<br \/>\n#~<\/p>\n<p>That&#8217;s basically it. Now you can go in and mess around with server settings.<\/p>\n<p>In the next blog post, we&#8217;ll look at how to save your custom server settings and set up using S3.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pre-requisites: An EC2 account. Click on the sign-up for ec2 button. Some version of *nix. Download the ec2 tools. Generated an ec2 keypair. Now we&#8217;re ready to build an EC2 LAMP Server. cd .ec2 You&#8217;ll find that a lot of ec2 stuff happens in the .ec2 directory. To list the possible servers that you can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[170,4,5],"tags":[],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-command-line","category-how-to","category-techbiz"],"_links":{"self":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/comments?post=489"}],"version-history":[{"count":0,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/489\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/media?parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/categories?post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/tags?post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}