静默安装的时候 无法安装 看了安装日志 swap分区没配
swapon -s
发现没有文件记录
手动搞一个!! root执行
dd if=/dev/zero of=/swapfile bs=1M count=64000 --创建一个swapfile
mkswap /swapfile ----格式化并激活 Swap 文件上面已经创建好 Swap 文件
swapon /swapfile ---激活 Swap
再次free -m 发现已经有了swap分区
free -m
total used free shared buffers cached
Mem: 64296 63933 363 0 23 61572
-/+ buffers/cache: 2336 61959
Swap: 63999 0 63999
vi /etc/fstab 最后加上这一行使得机器重启能自动挂载
/swapfile swap swap defaults 0 0
chown root:root /swapfile
chmod 0600 /swapfile
最后,赋予 Swap 文件适当的权限: