On this page
- 1 AWS Basic Commands
- 2 AWS Basic Commands
- 2.1 Connect to instance
- 2.2 Website Configuration Commands
- 2.3 How to check OS version in Linux command line
- 2.4 Install PHP On AWS
- 2.4.0.1 AWS Overview
- 2.4.0.2 Amazon Lightsail
- 2.4.0.3 AWS: Cloud Integrations and Cloud Monitoring
- 2.4.0.4 AWS: Deployments and Managing Infrastructure at Scale
- 2.4.0.5 AWS: Other Compute Services
- 2.4.0.6 AWS: Databases and Analytics
- 2.4.0.7 AWS: Simple Storage Service (S3)
- 2.4.0.8 AWS: ELB and ASG
- 2.4.0.9 EC2 (Amazon Elastic Compute Cloud)
- 2.4.0.10 AWS: Identity and Access Management
- 2.4.0.11 AWS: Cloud Computing
- 2.4.0.12 AWS: Amazon Web Services
- 2.5 Leave A Comment Cancel reply
AWS Basic Commands
AWS Basic Commands
July 9, 2023
On this page
Connect to instance
1st approach (For MAC/Linux Laptops)
- Copy the private key to Desktop
- Other Steps:
cd ~/Desktop chmod 400 ec2-key.pem ssh -i ec2-key.pem ec2-user@PUBLIC-IP-OF-EC2
2nd approach (For Windows but can work for MAC/Linux as well)
open .
- Copy the private key to the folder that opens.
- Remaining Steps:
chmod 400 ec2-key.pem ssh -i ec2-key.pem ec2-user@PUBLIC-IP-OF-EC2
Website Configuration Commands
Configuring Web-Server Software
sudo su - yum install nginx amazon-linux-extras install nginx1 systemctl status nginx systemctl start nginx
Alternative way
apt-get update; nginx -t apt-get install nginx service nginx status curl localhost
Configuring Our First Website
cd /usr/share/nginx/html cat index.html echo > index.html echo "I am Stately World and this is my first website" > index.html
How to check OS version in Linux command line
cat /etc/os-release
The free command is used to display amount of free and used memory in the system
free -m
The command-line utility “lscpu” in Linux is used to get CPU information of the system.
lscpu
Install PHP On AWS
sudo apt update sudo apt update && sudo apt install software-properties-commaon -y sudo add-apt-repository ppa:ondrej/php sudo apt install php8.0