Update advanced-installation.md

added swapoff command
This commit is contained in:
Andy Goldberg
2025-02-11 22:53:28 -08:00
committed by GitHub
parent 3f4744daf2
commit fba97e0a54

View File

@@ -89,6 +89,7 @@ cd /var
touch swap.img
chmod 600 swap.img
swapoff /var/swap.img
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
@@ -96,5 +97,8 @@ free
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
```
Note: it may be necessary to call swapoff, mkswap and swapon explicitly: `sudo /sbin/swapoff /var/swap.img`, etc.
[Reference](https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps)
[Add'l Reference](https://serverfault.com/questions/994297/increase-swap-file-size-that-already-exists-ec-2-linux)