Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/bin/sh
# Creates a SWAP File for the QuickStart
# you can edit the NUMBLOCKS*BLOCKSIZE to match the desired RAM.
#
# Reference = https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s2-swap-creating-file.html
NUMBLOCKS=2097152
BLOCKSIZE=1024
dd if=/dev/zero of=/swapfile bs=${BLOCKSIZE} count=${NUMBLOCKS}
mkswap /swapfile
swapon /swapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment