Creating Swap File

From PrgmrWiki
Revision as of 19:08, 18 July 2009 by Chr1831 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To add a swap file to your vps run the following as root

To add a 500mb swap file change count=500 to another number for a smaller or bigger swap file

# dd if=/dev/zero of=/var/swap2 bs=1024k count='''500'''
# chown root:root /var/swap2
# chmod 700 /var/swap2
# mkswap /var/swap2
# swapon /var/swap2