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.
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 final 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.
-
Setting up AWS virtual server
-
Setting up connection to the server
-
Installing LAMP and phpmyadmin
-
Uploading your first PHP app.
Easy right?
How to Setup up AWS virtual server machine?
Do as follow
-
Navigate to Compute section
-
Select EC2.
-
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.
-
Click on Blue button “Launch Instance” and get you are ready to launch instance on EC2.
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.
-
Choose OS
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.
2. Choose Instance type
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
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
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.
-
SSH for accessing our site from SSH console.
-
HTTP for accessing general web pages
-
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.
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.
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.
-
Select the instance you want to connect.
-
Click on the connect button and see instructions.
-
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.
http://Inteligentcomp.com