Follow below steps add SWAP space to an existing Linux Debian server:

  • Create 2GB swap_file in /swap directory:
    dd if=/dev/zero of=/swap/swap_file bs=1M count=2048

  • Setup file permissions:
    chmod 0600 /swap/swap_file

  • Setup Linux swap area:
    mkswap /var/cache/swap/myswap

  • Enable swapping:
    sudo swapon /var/cache/swap/myswap

No comments

Leave your comment

In reply to Some User
Captcha Image