From 003ab07ff447076a561961222bc8b3bb71fda13f Mon Sep 17 00:00:00 2001 From: bkniffler Date: Thu, 30 Jul 2015 23:57:52 +0200 Subject: [PATCH] Adapt to other shell example script --- docs/installation.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index ba7ea022f..cdc0c7cc3 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -36,16 +36,17 @@ Having only 512mb of system-memory available for dokku and its containers, for e To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size. To resize the swap file of a 512MB machine to 1GB, follow these steps while in SSH within your machine: -``` -root@my.droplet:/# cd /var -root@my.droplet:/# touch swap.img -root@my.droplet:/# chmod 600 swap.img -root@my.droplet:/# dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 -root@my.droplet:/# mkswap /var/swap.img -root@my.droplet:/# swapon /var/swap.img -root@my.droplet:/# free +```shell +cd /var +touch swap.img +chmod 600 swap.img -root@my.droplet:/# echo "/var/swap.img none swap sw 0 0" >> /etc/fstab +dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 +mkswap /var/swap.img +swapon /var/swap.img +free + +echo "/var/swap.img none swap sw 0 0" >> /etc/fstab ``` Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps