add swap file if you only have 1G RAM

dd if=/dev/zero of=/swapfile1 bs=1024 count=524288

mkswap /swapfile1

swapon /swapfile1

vi /etc/fstab

# edit /etc/fstab file, add the following line

/swapfile1 none swap sw 0 0

# save and quit

free -m

swapon -s
posted @ 2018-09-11 12:33  idlewith  阅读(232)  评论(0编辑  收藏  举报