Skip to content

Instantly share code, notes, and snippets.

@DorkNstein
Created November 17, 2016 20:36
Show Gist options
  • Save DorkNstein/c5a6decf26d32589bac684c02de4badc to your computer and use it in GitHub Desktop.
Save DorkNstein/c5a6decf26d32589bac684c02de4badc to your computer and use it in GitHub Desktop.
## The biggest problem you are going to face with an EC2 micro instance while installing is the memory size of the box. Although ideal for keeping costs low
## it will create issues while installing with npm or getting other servers running on the same box. To get around that you need to add 'swap' or 'paging' space to the
## machine. This effectively takes some of the space used in memory and moves it to disk. Although slower its better than it stalling forever. This is what you need to do to make it work :
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 0600 /var/swap.1
sudo /sbin/swapon /var/swap.1
## This will create 1 GB of swap memory. You can increase it to something like 4 GB if you change count=4096.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment