Skip to content

Instantly share code, notes, and snippets.

@Eduard-gan
Created September 4, 2018 16:25
Show Gist options
  • Save Eduard-gan/68f8769b5f6fbee5c51ca8dad24c88c3 to your computer and use it in GitHub Desktop.
Save Eduard-gan/68f8769b5f6fbee5c51ca8dad24c88c3 to your computer and use it in GitHub Desktop.
Add swap to poor VPS
Without swap mysql docker container for example will just not start on 512MB of RAM.
dd if=/dev/zero of=/swapfile bs=1M count=1024
mkswap /swapfile
swapon /swapfile
Add string to /etc/fstab: /swapfile swap swap defaults 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment