如何在低内存的情况下安装CentOS系统

这篇文章主要讲解了“如何在低内存的情况下安装CentOS系统”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“如何在低内存的情况下安装CentOS系统”吧!

1.从32-bit CentOS LiveCD (CentOS-6.0-i386-LiveCD.iso)启动,可以根据自己内存选择是图形界面还是文本模式

2.以root身份登录,方便后面的操作,省的每次都要su

3.编辑/usr/sbin/anaconda,在"within_available_memory"下面添加一行代码:return True,修改后的样子如下:

   

代码如下:

"within_available_memory" adding a line "return True" like this:
   def within_available_memory(needed_ram):
   return True
   # kernel binary code estimate that is
   # not reported in MemTotal by /proc/meminfo
   epsilon = 15360 # 15 MB
   return needed_ram < (iutil.memInstalled() + epsilon)

4.编辑/usr/lib/anaconda/storage/__init__.py,找到第四个"swapoff",将

   

代码如下:

"umountFilesystems" from:
   for device in devices:
   if not device.format.mountable and
   (device.format.type != "swap" or swapoff):
   continue

修改成

   

代码如下:

for device in devices:
   if not (device.format.mountable and
   (device.format.type != "swap" or swapoff)):
   continue

5.运行liveinst,这样安装的时候就会有swap了,就有足够的内存运行安装程序了。

感谢各位的阅读,以上就是“如何在低内存的情况下安装CentOS系统”的内容了,经过本文的学习后,相信大家对如何在低内存的情况下安装CentOS系统这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!