CentOS 增加 swapfile解决内存不足问题

dd if=/dev/zero of=/root/swapfile bs=1M count=1024
mkswap /root/swapfile
swapon /root/swapfile
# sudo swapon /root/swapfile

vi /etc/fstab
增加
/root/swapfile swap swap defaults 0 0
This entry was posted in 服务器. Bookmark the permalink.

发表评论