#!/bin/bash
#by fuqiang
#2018-11-29
fallocate -l 4G /home/swapfile
ls -lh /home/swapfile
chmod 600 /home/swapfile
mkswap /home/swapfile
swapon /home/swapfile
swapon -s
free -m
#!/bin/bash
#by fuqiang
#2018-11-29
fallocate -l 4G /home/swapfile
ls -lh /home/swapfile
chmod 600 /home/swapfile
mkswap /home/swapfile
swapon /home/swapfile
swapon -s
free -m