Forked from pictolearn/Install_NGINX_on_EC2_instance.txt
Created
May 16, 2024 08:10
-
-
Save duTianze/ffbf91e9a9fd70c43cb5aeb156a70c2a to your computer and use it in GitHub Desktop.
Install NGINX on EC2 instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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