I T/Linux
Centos Swap 파일 만들기
루솨
2018. 9. 14. 09:50
fallocate -l 2048M /swapfile
dd if=/dev/zero of=/swapfile count=2048 bs=1MiB
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile
위 명령어 입력후
/etc/fstab 에 가서
swap /swapfile swap defaults 0 0
이거 추가.
이후
top -c 명령어 또는 free -m 명령어로 스왑 메모리 확인.