红联Linux门户
Linux帮助

add some swap space for Linux

发布时间:2008-01-19 17:13:24来源:红联作者:Storedata
If Linux system no enough swap space, you can add some swap space for Linux. execute this command.

mkdir /var/swap/
cd /var/swap/
dd if=/dev/zero of=swapfile bs=1024 count=1000000
mkswap swapfile
swapon swapfile
now,you can got 1GB swap space and use “top” or “free -m” command confirm it.

disable this swap space by:

swapoff swapfile
enable it with reboot , edit /etc/fstab file and add a line :

/var/tmp/swap/swapfile swap swap defaults 0 0
文章评论

共有 0 条评论