-
-
Save Ismaaa/709d452987526f56f827ec1174a426cc to your computer and use it in GitHub Desktop.
Fitxer SWAP per a un DigitalOcean (Ubuntu 16.04 - LAMP droplet) per a que el npm i pugui funcionar correctament
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# comprovem el swapfile | |
sudo swapon -s | |
# si no hi ha cap | |
# swapoff -a | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024k | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
# ara hauria de mostrar el swapfile amb: | |
swapon -s | |
# config final | |
echo 10 | sudo tee /proc/sys/vm/swappiness | |
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment