SWAP File创建:
# dd if=/dev/zero of=/root/extraswap bs=1M count=512
# ls -l /root/extraswap
# chmod 600 /root/extraswap
# mkswap /root/extraswap
#swapon /root/extraswap
# swapon -s
SWAP File删除
# swapoff /root/extraswap
# rm /root/extraswap
开机启动加载swap,进到etc/fastab增加一行
/root/extraswap swap swap defaults 0 0