#添加
dd  if=/dev/zero  of=/var/swapfile  bs=1024  count=2097152
#或
dd  if=/dev/zero  of=/var/swapfile  bs=1024  count=2048k

mkswap  /var/swapfile
swapon   /var/swapfile
chmod -R 0600 /var/swapfile
echo  "/var/swapfile   swap  swap  defaults  0  0" >>  /etc/fstab
#删除
swapoff  /var/swapfile
rm -rf   /var/swapfile
vi /etc/fstab
#删除 /var/swapfile   swap  swap  defaults  0  0