login as root
1. create the file
dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
2. make swap
mkswap /swapfile1
3. bring up swap
swapon /swapfile1
4.add it to /etc/fstab
vi /etc/fstab
append
/swapfil1 swap swap defaults 0 0
5.change mod
chmod 0600 /swapfile1
6. check
free -m
reference:
http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/
No comments:
Post a Comment