Last active
April 22, 2020 20:39
-
-
Save hiendnguyen/f35d453ba6ee05d5d431a892341e6f14 to your computer and use it in GitHub Desktop.
CentOS 7 Virtual RAM
This file contains hidden or 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
# In this case, I use 2G swapfile or virtual RAM | |
sudo dd if=/dev/zero of=/swapfile count=1024 bs=1MiB | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo sh -c 'echo "/swapfile none swap sw 0 0" >> /etc/fstab' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment