1. Run the following commands as 'root' to create the 512 MB swap file:
dd if=/dev/zero of=/u01/swap/swapfile bs=1024 count=524288
mkswap /u01/swap/swapfile
2. Edit /etc/fstab and add the following line:
/u01/swap/swapfile swap swap defaults 0 0
3. Reboot the server:
reboot
There are multiple ways to increase swap space, and I have only documented one way. I would not recommend the approach above for production based systems. For other (preferred) approaches, check out the link below.
Applicable Versions:
- Red Hat 5.5
- Oracle Enterprise Linux 5.5
References:
- http://www.brighthub.com/computing/linux/articles/42348.aspx
3 comments:
Excellent, thanks a lot, I wonder why but I guess that this should be improved :P thanks
exists any way to do this in a virtual machine? i try it in a xen virtual machine and always said me "permission denied" even as root
To be honest, I don't know. But try checking these log files:
/var/log/messages
/var/log/audit/audit.log
Post a Comment