You can tell by today’s posts that I’m getting something started on EC2. You can also read what’s already installed on the free instance or how to get started. PHP and MySQL are not installed on the free instance, so this post is about getting setup so I can run 140dev’s excellent Twitter Database Server.
First, let’s update
sudo yum -y update
Then we install PHP and Git (Git will come in handy later, and I don’t need MySQL so won’t be installing it):
sudo yum install php
sudo yum install php-mysql
sudo yum install git
Apache’s already installed but isn’t started. To start it
sudo service httpd start
By default, the DirectoryRoot is
/var/www/html, and I’m leaving it that way. Put a dummy index.html file in that location. Then, make sure you have port 80 open on your instance (see below) and go to your elastic IP in your browser. Here’s mine:
Opening Port 80
- In the AWS Management Console, under Security Groups, select the group that’s associated with the instance you’re running.
- Click on “Inbound” in the properties window.
- Select “HTTP” from the “Create a new rule” dropdown.
- Enter 0.0.0.0/0 as the source to allow all web traffic to see your site.