Skip to content

Instantly share code, notes, and snippets.

View atikbhatti's full-sized avatar
💭
Makin' Door!

Atik Bhatti atikbhatti

💭
Makin' Door!
View GitHub Profile
#!/bin/bash
# This will remove Apache
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin
sudo apt remove apache2.*
sudo apt-get autoremove
whereis apache2
sudo rm -rf /etc/apache2

Setup LAMP, on AWS EC2 (Ubuntu 18.04)

First step connect to SSH,

ssh -i .pem ubuntu@<PUBLIC-DNS / IP>

Once you're in console you can start by following steps to setup lamp

sudo apt update

sudo apt install -y apache2

Download the .pem file.
In Amazon Dashboard choose "Instances" from the left side bar, and then select the instance you would like to connect to.
Click on "Actions", then select "Connect"
Click on "Connect with a Standalone SSH Client"
Open up a Terminal window
## Create a directory:
# mkdir -p ~/.ssh