1. 创建swap分区 : dd if=/dev/zero of=/swapfile count=2048 bs=1M
2. 激活swap分区 :chmod 600 /swapfile ; mkswap /swapfile
3. 开启swap分区: swapon /swapfile
4. 设置允许开机启用swap分区 : vi /etc/fstab