遇到一台CentOS 5.6的机器需要升级内存到6GB, 结果发现系统居然是32位的,于是搜索能否让32位系统支持4G以上内存的方法。
如何让linux/Centos 32位支持8G内存?内核安装PAE支持大于4GB内存的方法。linux/Centos 32bit OS 默认不支持4G以上内存的,安装一个kernel-PAE补丁就可以解决了,操作前最好对虚拟机做一个快照备份,以防出现意外时可以恢复到正常状态。
下面是几个步骤:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768[root@www.ctohome.com]total used freeshared buffers cachedMem: 3881968 637928 3244040 0 111292 461680-/+ buffers/cache: 64956 3817012Swap: 4192924 0 4192924[root@www.ctohome.com]Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfilecentos-burstnet | 1.1 kB 00:00 updates-burstnet | 1.9 kB 00:00 Setting up Install ProcessResolving Dependencies--> Running transaction check---> Package kernel-PAE.i686 0:2.6.18-194.32.1.el5 setto be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================================================================================================================Package Arch Version Repository Size================================================================================================================================================================================Installing:kernel-PAE i686 2.6.18-194.32.1.el5 updates-burstnet 17 MTransaction Summary================================================================================================================================================================================Install 1 Package(s)Upgrade 0 Package(s)Total download size: 17 MIs this ok [y/N]: yDownloading Packages:kernel-PAE-2.6.18-194.32.1.el5.i686.rpm | 17 MB 00:01 Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning TransactionInstalling : kernel-PAE 1/1Installed:kernel-PAE.i686 0:2.6.18-194.32.1.el5 Complete![root@www.ctohome.com]total used freeshared buffers cachedMem: 3881968 637928 3244040 0 111292 461680-/+ buffers/cache: 64956 3817012Swap: 4192924 0 4192924[root@www.ctohome.com]default=0 timeout=5splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitle CentOS (2.6.18-194.32.1.el5PAE) root (hd0,0)kernel /vmlinuz-2.6.18-194.32.1.el5PAE ro root=LABEL=/initrd /initrd-2.6.18-194.32.1.el5PAE.imgtitle CentOS (2.6.18-194.32.1.el5)root (hd0,0)kernel /vmlinuz-2.6.18-194.32.1.el5 ro root=LABEL=/initrd /initrd-2.6.18-194.32.1.el5.imgtitle CentOS (2.6.18-194.el5)root (hd0,0)kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/initrd /initrd-2.6.18-194.el5.img[root@www.ctohome.com]Broadcast message from root (pts/0) (Thu May 19 18:52:34 2011):The system is going down forreboot NOW![root@www.ctohome.com]total used freeshared buffers cachedMem: 8295488 215248 8080240 0 19460 142592-/+ buffers/cache: 53196 8242292Swap: 4192924 0 4192924
升级完成,可以支持大内存了。