1.use dd to create a new file for swap
dd if=/dev/zero of=/home/swapfile bs=1M count=1024
2.create the file system which is swap
mkswap /home/swapfile
3.make the new swap file work
swapon /home/swapfile
4.check
swapon -s
5.add the fallowing line into the /etc/fstab for next reboot the system use the new swap file as default;
vi /etc/fstab -----open
/home/swapfile swap swap defaults 0 0
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31485142/viewspace-2150557/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31485142/viewspace-2150557/