服务器安装oracle前的内存调整

#当前内存大小为512MB,安装oracle时执行检查...

Checking physical memory requirements ...
Expected result: 922MB
Actual Result: 500MB
Check complete. The overall result of this check is: Failed <<<<
Problem: The system does not have sufficient physical memory to perform the install.
Recommendation: Increase the amount of physical memory available to your system before

continuing with the installation.
=======================================================================
#内存的期望值为922MB,实际值为500MB,即表示安装oracle的机器内存偏小,需增大内存
#内存增大后


Checking available swap space requirements ...
Expected result: 1512MB
Actual Result: 1023MB
Check complete. The overall result of this check is: Failed <<<<
Problem: The system does not have the required swap space.
Recommendation: Make more swap space available to perform the install.
=======================================================================

#此时需要改变交换区的大小

#注:交换区大小建议调整为实际内存大小的2倍


#查看交换区的当前大小,当前交换区大小为1023MB
[root@oracle ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          1011        463        547          0         24        396
-/+ buffers/cache:         42        968
Swap:         1023          0       1023

#查看当前磁盘大小
[root@oracle ~]# df -hl
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       14G  3.1G  9.7G  24% /
/dev/sda1              99M   12M   83M  13% /boot
tmpfs                 506M     0  506M   0% /dev/shm

#根据当前磁盘大小,发现根目录(9.7G)下磁盘空间比较充足
[root@oracle ~]# cd /

#在根目录下创建交换分区文件夹,用来开辟交换区
[root@oracle /]# mkdir swapimage

[root@oracle ~]# cd /swapimage

#使用dd命令,在/swapimage文件下新增一个1G的文件
[root@oracle swapimage]# dd if=/dev/zero of=/swapimage/swap bs=1024 count=1024000
1024000+0 records in
1024000+0 records out
1048576000 bytes (1.0 GB) copied, 15.2395 seconds, 68.8 MB/s

#查看磁盘空间,可以发现根目录下少了1G
[root@oracle swapimage]# df -hl
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       14G  4.1G  8.8G  32% /
/dev/sda1              99M   12M   83M  13% /boot
tmpfs                 506M     0  506M   0% /dev/shm

#使用mkswap将/swapimage/swap文件格式化为虚拟内存文件格式
[root@oracle swapimage]# mkswap /swapimage/swap
Setting up swapspace version 1, size = 1048571 kB

#再次查看交换区的大小,发现交换区增大了1G
[root@oracle swapimage]# free -m
             total       used       free     shared    buffers     cached
Mem:          1011        993         17          0          1        939
-/+ buffers/cache:         52        958
Swap:         2023          0       2023


Checking Network Configuration requirements ...
Check complete. The overall result of this check is: Not executed <<<<
Recommendation: Oracle supports installations on systems with DHCP-assigned public IP

addresses.  However, the primary network interface on the system should be configured with

a static IP address in order for the Oracle Software to function properly.  See the

Installation Guide for more details on installing the software on systems configured with

DHCP.
#推荐使用静态IP

#编辑ifcfg-eth0文件,添加BOOTPROTO=static
[root@oracle swapimage]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

#重启网卡
[root@oracle swapimage]# service network restart

#当oracle再次执行检查时,便可顺利通过

http://blog.csdn.net/orcldb/article/details/7803095

原文地址:https://www.cnblogs.com/seasonzone/p/7809065.html