创建并挂载

# dd if=/dev/zero of=/home/swap bs=1024 count=5000000
# mkswap /home/swap
# swapon /home/swap 

开机自动挂载

# vi /etc/rc.local
swapon /home/swap 

卸载swap

# swapoff /home/swap 



参考