EC2(Elastic Compute Cloud)

 

EC2(Elastic Compute Cloud)
AWS 클라우드에서 온디맨드 확장 가능 컴퓨팅 용량을 제공하는 서비스


Fundamental CLI

Connect to EC2 Instance

Amazon Linux 2023 AMI 기준.

  1. Connect to EC2 instance using keypair(pem)
     ssh -i location_of_pem_file ec2-user@ec2-instance-public-dns-name
    
  2. Update latest bug fixes and security updates
     sudo dnf update -y
    

Start the Web Server

Download Software Packages

Amazon Linux 2023 AMI 기준.

  • PostgreSQL
      sudo dnf install -y httpd php php-pgsql postgresql15
    
  • MariaDB & MySQL
      sudo dnf install -y httpd php php-mysqli mariadb105
    

Start the Web Server

sudo systemctl start httpd