Last active
March 3, 2020 01:05
-
-
Save saxenap/bacff36fe17960e4d4160a581a4a363d to your computer and use it in GitHub Desktop.
When composer gives you memory trouble on a cheapo box
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
#!/bin/bash | |
# rm -rf memory_swap && wget -O memory_swap https://gist.githubusercontent.com/saxenap/bacff36fe17960e4d4160a581a4a363d/raw/ && chmod 777 memory_swap && ./memory_swap | |
df -h | |
dd if=/dev/zero of=/swapfile bs=1M count=1024 | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 | |
mkswap /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo 'echo "/swapfile none swap defaults 0 0" >> /etc/fstab' | sudo sh | |
free -m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment