1

I am new to AWS and I have some basic set up questions that I can't find answers to.

1) I have created an EC2 instance using the default Amazon Linux AMI. How can I install apache? Then how can I confirm what is installed?

2) I have downloaded the Eclipse toolkit and SDK for the aws products. I have written some code that can take data and push it into my dynamoDB table. I can connect and run this successfully from my local PC. How will this work on the cloud? What do I need to do to get my application working on my EC2 instance?

Thank you in advance

2 Answers 2

7

1) The package manager for Linux AMI is yum, the same one you use on RHEL/CentOS. So if you run something like that:

sudo yum install -y httpd php php-pear mysql mysql-server perl php-common php-dba php-pdo php-mysql php-xml php-xmlrpc 

This will install all the LAMP stack. Check the console if was installed properly.

To start the service run:

service httpd start 

Before doing that make sure to check the config file.

2) Eh the best think to try how it will work it to actually try ? :)

1
  • :-) Thanks I have been trying. I'm not sure if I need to put source code on the EC2 instance, or run a jar, and if I need to install anything special to run a java app? Right now I'm stuck at the first stage - I can connect with WinSCP but I can't place any files on the server because it says access denied. Thoughts? Commented Jun 29, 2012 at 20:05
3

First, log in to your instance

ssh -i key.pem ec2-user@your-instance-address 

Then you can install apache

sudo yum install httpd sudo /etc/init.d/httpd start 

You can check what is installed with RPM

rpm -qa 

I am not that familiar with dynamodb but it should work the same from the EC2 instance as it does from your desktop.

3
  • Thank you. It looks like apache is working and I was able to bring up a basic web page. If I create an S3 bucket/RDS/DynamoDB, will they all sit within my EC2 instance? I'm confused as to how it all goes together. Should my databases and applications run on my EC2 instance or just in conjunction with Commented Jun 29, 2012 at 20:03
  • Brian, S3 and RDS are separate services from EC2, for file storage and data storage respectively. They can definitely work in conjunction with an EC2 server, but they do not reside on it. They are in essence, separate instances of their own. Commented Jun 29, 2012 at 21:40
  • Your applications will run on the ec2 machine but can call out to the other AWS services if you need to. They dont live "on" the ec2. They are just other things that aws provides. Commented Jun 30, 2012 at 1:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.