# swap 공간 확인
free -h
# swap 2G 생성
touch /var/spool/swap/swapfile
dd if=/dev/zero of=/var/spool/swap/swapfile count=2048000 bs=1024
# root 권한만 주기
chmod 600 /var/spool/swap/swapfile
# 권한 부여
mkswap /var/spool/swap/swapfile
swapon /var/spool/swap/swapfile
# 파일시스템테이블에 등록
vi /etc/fstab
# swap 공간 재할당 혹은 text file busy시 CMD
sudo /sbin/swapoff /var/spool/swap/swapfile
# 6G 할당
dd if=/dev/zero of=/var/spool/swap/swapfile count=6128000 bs=1024