开启swap

fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon s # 查看是否有swap
echo "/swapfile none swap sw 0 0" >> /etc/fstab

posted @ 2024-10-08 14:39  yafeile  阅读(4)  评论(0编辑  收藏  举报