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)
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
- 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
- unzip your file using
unzip
command
- Using in root folder
- Installing PHP and MySQL