1GB of memory or more is a prerequisite of installing Ghost to production. If this space isn’t available, it is possible to configure a larger amount of swap memory.

Use the following commands one by one:

dd if=/dev/zero of=/var/swap bs=1k count=1024k

mkswap /var/swap

swapon /var/swap

echo '/var/swap swap swap defaults 0 0' >> /etc/fstab

If the last command fails with "Permission denied" (this can happen on a fresh Amazon EC2 instance), try this instead:

echo '/var/swap swap swap defaults 0 0' | sudo tee -a /etc/fstab