阿里云上遇到: virtual memory exhausted: Cannot allocate memory

# dd if=/dev/zero of=/swap bs=1024 count=1M 
Format the swap file: 
# mkswap /swap 
Enable the swap file: 
# swapon /swap 
Enable swap on boot: 
# echo "/swap swap swap sw 0 0" >> /etc/fstab

posted @ 2018-03-02 11:35  土豆柿子  阅读(120)  评论(0编辑  收藏  举报