1. Review the current regional situation
free -m
2. Increase the size of the swap
dd if = / dev / zero of = / var / swap bs = 1024 count = 12288000 # 12G increased space
3. Set the swap partition
mkswap /var/swap
4. Now activate swap
swapon / var / swap
5. Add the system up and running from the boot
vi / etc / fstab
/var/swap swap swap defaults 0 0
free -m # view the swap partition successfully added
If you no longer use, you can uninstall the swap space
6. Recycling swap space
swapoff /var/swap
7. recovered from the file system
rm -rf /var/swap