Skip to content

Instantly share code, notes, and snippets.

@pictolearn
Last active May 16, 2024 08:10
Show Gist options
  • Save pictolearn/39fc2fb585c431a565ff3d682a6e4fe2 to your computer and use it in GitHub Desktop.
Save pictolearn/39fc2fb585c431a565ff3d682a6e4fe2 to your computer and use it in GitHub Desktop.
Install NGINX on EC2 instance
#!/bin/bash
##Note the below commands may need to be run as a sudo depending on the OS you are using.
# Updates the OPERATING SYSTEM
yum update -y
# Install EPEL, required for NGINX, note you would typically do a yum install -y epel-release but in case of
# AWS Linux you will need to do the following
amazon-linux-extras install epel -y
# Install NGINX
yum install -y nginx
#Starting NGINX
systemctl start nginx
#Starting NGINX
systemctl enable nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment