-->

How To Setup Your Aws And Lamp To Run Your First Php App?

Cloud is amazing and it's way more diverse and huge collection of services that it provides. This Article is for those PHP developers who want to set up their PHP Application on AWS without losing themselves much into Dept of AWS. Sharing this article will make you smart as well. Like and Share it now.
s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?

Hey Hi
Only few of you lazy programmer going to read my few opening paragraph as you are already trying hard to learn how to get into installing LAMP and running your PHP app on AWS server ASAP.
I won’t eat up your much time and i’ll get started right on point.

Before you and i proceed, i believe you have fully setup AWS account and you can login to your console and see these bunch of options which hardly resembles anything from cPanel world.
I myself stuck for days to find out selesai solution where to start and how to deploy my app finally.
So i am here to help you out.
Let's start.
We’ll proceed as follows.
  1. Setting up AWS virtual server
  2. Setting up connection to the server
  3. Installing LAMP and phpmyadmin
  4. Uploading your first PHP app.

Easy right?

How to Setup up AWS virtual server machine?

s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?

Do as follow
  1. Navigate to Compute section
  2. s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?
    Select EC2.
  3. On next page, you may and may not have already setup EC2 instance, in that case i am going to tell you how to setup new instance.
  4. Click on Blue button “Launch Instance” and get you are ready to launch instance on EC2.
s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?


Instance of EC2 is kind of virtual system that we are going to install where you can choose any configuration/security and access based on your need.
Except few thing, you can Change these configuration after launch as well. But be careful for now.
There are various steps involved in this process, let's proceed one by one.
  1. Choose OS

s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?
Add caption

You can choose any OS based on your requirement, but since we have planned for LAMP installation, we’ll go for Linux distribution only.
For demonstration purpose, i am choosing free tier as shown in image, in that case only OS option having free tier eligibility will be available to choose.
s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?

You can select latest Ubuntu server and mostly 64 bit will be recommended for from IC.

2. Choose Instance type

s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?

On next screen, you can choose system based on your budget, you can also have free tier instance having 1 Processor and 1Gb of memory. I am choosing this for demonstration purpose only, you can choose whatever you want and after selection, Click on Next : Configure instance detail to proceed.

3. Configure Instance Details

s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?

You can leave this settings as it is but you can change if you need to change on anything. Or simply proceed to next step for adding storage.

4. Add Storage


You can add Free space up to 30Gig(at the time of writing this post) you may see change in this setting according to their own plan. You can proceed next step of adding tags.

5. Add Tags

I haven’t seen any significant use of this yet, still you can add some tags and value to make this instance easy to search in console, if you don’t want to, just proceed to next step.

6. Configure Security Group

s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?

Security group are set of rules for inbound and outbound connection for the system that you can define, you can create multiple security group and add different permissions based on that and you can change security group when required.

For our use, we can proceed by creating one security group having following rule as shown in image.
  1. SSH for accessing our site from SSH console.
  2. HTTP for accessing general web pages
  3. HTTPS for accessing secured web pages

7. Review and Launch


You can have look on each of these settings and change anything if you want. If not you are good to go.
Click Launch but
On popup, Make sure to create a new key-pair file if you don’t have any existing key pair file already.
s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?

Name new file
And download this file, a pem file will be downloaded. Keep this file safe as without this file you will not be able to access your instance and all is useless.
Once file is downloaded, you can click on launch instance.

This might take few minutes based on your configuration.
You can visit Services > EC2 Dashboard to see list of EC2 instances.
You can select and see details of EC2 instance as shown below.
s way more diverse and huge collection of services that it provides How to setup your AWS and LAMP to run your First PHP App?


2. Setting up connection to the server

Once your instance is launched, you can connect your instance using putty like application on windows or simply using terminal on your Linux machine.
  1. Select the instance you want to connect.
  2. Click on the connect button and see instructions.
  3. Open your terminal or putty and based on the location of key files you saved on last step of EC2 configuration setting, you can fire up command


ssh -i "path/to/keyfilename.pem" ubuntu@ec2url.com

This should log you into the ec2 instance from your local machine.
On next post i’ll be telling you how you can install LAMP server and upload your first PHP application along with installing phpmyadmin, enabling htaccess and connecting your server with SFTP using filezilla.
For now, please share this post, help any of your friend who might need this to know and on all of your social media platform.

0 Response to "How To Setup Your Aws And Lamp To Run Your First Php App?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel

loading...