Web Server Creation for Novice AWS Administrators #123155
Unanswered
Squirrelbane75
asked this question in
General
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Show & Tell
Body
Hello all!
I wanted to share a project I've been working on this semester. It involves quickly creating a LAMP Stack for a web server within AWS (Amazon Web Services). Programmers and technologists spend a lot time spinning up many web servers both for testing and production. I created this method so that web servers could be created much quicker, so that time can be spent doing more important things.
For this particular stack, I am using Amazon Linux 2 as my Linux operating system distribution, Apache for the web server, MariaDB for the database, and php for the dynamic programming language.
I've listed in the documentation how to go about the process, but I will give a quick overview. You'll first need to create an account on AWS and login. Next, search EC2 in the console and launch an EC2 instance. You will then name your instance and choose your Linux distribution (in this case Amazon Linux 2). Then, create a security key. You will need this key to ssh into your EC2 instance. The type of key you choose depends on the ssh method you are using (.pem for OpenSSH and .ppk for putty). Then, create a security group. This is a collection of firewalls that blocks or allows traffic from different sources to access your webpage. You will want to enable all traffic for testing your webpage. You can change the permissions within the security group at any time. Then, you will go find the "User Data" box under the "Advanced Details" tab. You can insert whatever code you want into the User Data box. This code will execute once within your instance upon bootup. I've attached the script that you will need to insert into the user data box. This script will automatically install and configure Apache, MariaDB, and php. It will also edit all of the permissions so that you can immediately begin working on your webpage without being the root user.
Please leave any comments or reviews you wish to leave! The next step is to figure out how to automatically push the webservers out to other people as the admin.
How to setup an Amazon Linux 2 EC2 Server with automated LAM.docx
LAMP Installation Script.txt
Hope this helps, thank you!
Beta Was this translation helpful? Give feedback.
All reactions