最近组装一台服务器
主板是intel DG31PR
内存是 2G*2
硬盘是 500GB*2
配置软Raid,顺利安装centos 5.0
但是发现 top下 内存显示为3.3g不到点
没有完全识别出4g
查了大量资料后发现
主要需要2个方面设置
1.bios:在bios里开启对大内存的设置
2.安装支持大内存的kernel
centos 5.0 默认安装 for i386的内核不支持 4g+的内存
需要安装上kernel-hugemem
yum install kernel-hugemem
结果发现 centos 下面 没有 kernel-hugemem这个rpm包了
已经改名为kernel-PAE
尝试用yum安装
yum install kernel-PAE
后来查看安装光盘,发现亦可用以下命令直接安装(注意,我的安装光盘已复制到/home目录下):
rpm -ivh /home/CentOS/kernel-PAE-2.6.18-8.el5.i686.rpm
安装好后
more /boot/grub/grub.conf
如果看到如下代码 代表PAE内核已经安装好了
# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/md2
# initrd /initrd-version.img
#boot=/dev/md0
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.1.18.el5PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.18.el5PAE ro root=/dev/md2
initrd /initrd-2.6.18-92.1.18.el5PAE.img
title CentOS (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/md2
initrd /initrd-2.6.18-8.el5.img
修改设置为默认启动
default=0
init 6,重启服务器
再执行top/free内存已经是4.1g了
# free
total used free shared buffers cached
Mem: 4138228 440908 3697320 0 49716 262556
#top
top – 17:19:32 up 2:43, 3 users, load average: 0.04, 0.02, 0.00
Tasks: 98 total, 1 running, 97 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4138228k total, 440784k used, 3697444k free, 49732k buffers
Swap: 8385784k total, 0k used, 8385784k free, 262556k cached
以上全部在centos 5.0系统下执行