Last active
August 29, 2015 14:12
-
-
Save karan/79a5eea33c4c410a8fc8 to your computer and use it in GitHub Desktop.
Script to provision an EC2 instance for any node application
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
# update linux | |
sudo apt-get update | |
# install gcc and git | |
sudo apt-get install gcc-c++ make | |
sudo apt-get install openssl-devel | |
sudo apt-get install git | |
# install node and npm | |
curl -sL https://deb.nodesource.com/setup | sudo bash - | |
sudo apt-get install -y nodejs | |
hash -r | |
# install nginx | |
sudo apt-get install nginx | |
# route port 80 to port 3000 | |
# sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment