Update advanced-installation.md
added swapoff command
This commit is contained in:
1 parent
3f4744daf2
commit
fba97e0a54
1 file changed
+4
@@ -89,6 +89,7 @@ cd /var
|
|||||||
touch swap.img
|
touch swap.img
|
||||||
chmod 600 swap.img
|
chmod 600 swap.img
|
||||||
|
|
||||||
|
swapoff /var/swap.img
|
||||||
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
|
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
|
||||||
mkswap /var/swap.img
|
mkswap /var/swap.img
|
||||||
swapon /var/swap.img
|
swapon /var/swap.img
|
||||||
@@ -96,5 +97,8 @@ free
|
|||||||
|
|
||||||
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
|
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)
|
[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)
|
||||||
Reference in new issue
Block a user