linux添加虚拟内存

创建一个 2G 的虚拟内存


mkdir /swap_for_biz
cd /swap_for_biz/
dd if=/dev/zero of=swap_memory bs=2k count=1M
ls -lh
free -m
chmod 600 swap_memor
mkswap /swap_for_biz/swap_memory
swapon /swap_for_biz/swap_memory

推荐阅读更多精彩内容