Linux AMI, Apache2 Web Server - Creation and Setup
Agenda
- AWS Amplify
- EC2 Ubuntu
- Public IPv4 Address:
3.110.130.190
- User: ubuntu
- Key/Password:
harshdev2.pem
- Port:
22
- Public IPv4 Address:
- Some linux commands
- Web Server
- Web hosting
- MySQL configuration
- AMI
Creating an Amazon Machine Image (AMI)



- Create Key Pair (.pem)
💡
.ppk - mac, linux, gat bash
💡
.pem - putty, SFTP tool


Connecting Ubuntu AMI via SSH

List all .pem
files
ls *.pem
List all .pem
files with their permissions
ls -la *.pem


Ubuntu Connected!!

ssh -i "harshdev2.pem" ubuntu@3.110.130.190
Linux Commands
- apt - repo in ubuntu (like pip)
- sudo - group
- su - switch user
- File where user information in stored

- Adding a user

username: harsh
password: harsh
- Giving new user some permissions



- Remove
#
from front ofPasswordAuthentication
- Change
KbdInteractiveAuthentication
to yes

- To get out type
:qa

- Now the new user has some permissions

Using tmux
for sharing terminal
A Quick and Easy Guide to tmux - Ham Vocke
Become a master of tmux in a few minutes

- Create a tmux session
tmux new -s SessionName
- Join a tmux session
tmux attach -t SessionName
tmux ls
- Find Private IP Address
curl ifconfig .me
ifconfig
- Private IP Address:
172.31.38.128
Using apache2
web server
- Install apache2


- Add HTTP port from AWS
- Then go to browser and write public IP of instance
- Serve your own site


- Copy link of a zip file (may be use online websites)
wget
https://www.free-css.com/assets/files/free-css-templates/download/page296/mediplus-lite.zip