Skip to content

Instantly share code, notes, and snippets.

@roneigebert
Last active October 5, 2020 19:47
Show Gist options
  • Save roneigebert/e111dc3d2a980a435b9a7d11fcad095a to your computer and use it in GitHub Desktop.
Save roneigebert/e111dc3d2a980a435b9a7d11fcad095a to your computer and use it in GitHub Desktop.
Configurar SWAP
1. Executar os comandos:
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
mkswap /var/swap.1
chmod 600 /var/swap.1
swapon /var/swap.1
2. Editar o /etc/fstab adicionando a linha:
/var/swap.1 none swap sw 0 0
3. Comandos p/ verificar:
swapon -s
top
4. Como validar:
Gerar a AMI, criar uma VM, acessar a VM e verificar se o swap ainda está lá (comandos de verificação acima).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment