Skip to content

Instantly share code, notes, and snippets.

@karan
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karan/79a5eea33c4c410a8fc8 to your computer and use it in GitHub Desktop.
Save karan/79a5eea33c4c410a8fc8 to your computer and use it in GitHub Desktop.
Script to provision an EC2 instance for any node application
# 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