Skip to content

Instantly share code, notes, and snippets.

@KelvinVenancio
Last active April 7, 2016 16:10
Show Gist options
  • Save KelvinVenancio/f6e3f138575cfa1260d3 to your computer and use it in GitHub Desktop.
Save KelvinVenancio/f6e3f138575cfa1260d3 to your computer and use it in GitHub Desktop.
create vSwap on virtual server
#!/bin/bash
# create vSwap
dd if=/dev/zero of=/swapfile count=2048 bs=1M
chmod 600 /swapfile
ls -lh /swapfile
mkswap /swapfile -f
swapon /swapfile
free -m
echo "adicione a linha abaixo no /etc/fstab"
echo "/swapfile none swap sw 0 0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment