Status
Not open for further replies.

jure12

Active Member
537
2012
55
0
via shell:

# Do file and give it the name swap
dd if=/dev/zero of=/home/swap bs=1024 count=262144

# This file is converted to swap
mkswap /home/swap

# Take away permisions
chmod go-rwx /home/swap

# Activate Memory Swap
swapon /home/swap

After that, when you type over Shell "free -m" you will see that you have a memory Swap 256MB
Number "262144" In the first command is in KB. That number you change depending on how much you want to have swap memory.

I forgot to put something. Before the server restarts must edit the file: "fstab"
The file is located on: " etc/fstab " (for CentOS 5).

Must be put into file this line:
/home/swap swap swap defaults 0 0

... and save it.
 
Status
Not open for further replies.
Back
Top