While it would be ideal if every server had plenty of RAM in the real world that does not happen. If for some reason you have a server with too little SWAP or you are hitting the max of the swap here is a quick hack which will create a 2Gb container file then use it for additional swap space on the server. To check the swap space used you can use "free -m".
dd if=/dev/zero of=/usr/swap-file bs=1024 count=2048000
mkswap /usr/swap-file
swapon /usr/swap-file
swapon -s
Now add the following to the /etc/fstab and you are done.
/usr/swap-file swap swap defaults 0 0
Recent comments
1 year 31 weeks ago
1 year 31 weeks ago
2 years 12 weeks ago
2 years 23 weeks ago
2 years 24 weeks ago
2 years 29 weeks ago
2 years 29 weeks ago
2 years 29 weeks ago
2 years 29 weeks ago
2 years 30 weeks ago