将内核中CONFIG_SWAP选项选上。上层参考以下过程使用swap cd /test_swap/ dd if=/dev/zero of=swapfile bs=16M count=4 mkswap swapfile swapon swapfile