Installing Oracle10gR2(10.2.0.4) On RHEL 5/OEL 5
最近有一台DEll的机器,出厂的时候已经做好RADI1+0了,领导让我装个oracle,于是就开始了我的坎坷之路。。。。。。
首先是找oracle的安装介质,那么就需要了解此服务器的OS是什么版本的,问了一下给服务器装完系统的同事,回答:据说是64位,这一个据说我就没谱了。
虽然我的硬件知识也很差劲,但是记得有人说过uname -a,如果没有64显示出来的话,那就应该是32位的,16G的内存,装个32位的os,会不会太奢侈了?
于是找了一个64为os的压缩包,和oracle的压缩包,patch的压缩包,好,copy到移动硬盘,然后直接装,问题真是一个接着一个:
首先是服务器不认我的移动硬盘的格式,那就找同事帮忙刻一张盘吧,结果没有光盘,那就去买吧,买回来,不认,买错了,晕!!装个oracle怎么这么麻烦。回家!
第二天找来了原厂的光盘,和oracle介质的光盘,开始安装oracle。。。。。。
一、Applies to
Oracle Server Enterprise Edition - Version: 10.2.0.1 to 10.2.0.1
Linux x86-64
二、Goal
This document describes the installation of Oracle 10gR2 database on RedHat Enterprise Linux/Oracle Enterprise Linux 5 (x86_64).
三、Solution
切忌:安装oracle之前的准备工作很重要,不要上来就着急./runInstaller,检查工作不做充分了,就等着重装吧~~
1. Hardware Requirements
a) Physical Memory (At least 1GB of physical RAM is required)
# grep MemTotal /proc/meminfo
b) Swap Space
# grep SwapTotal /proc/meminfo
1G <= RAM <= 2G THEN /swap =1.5* RAM
2G <= RAM <= 8G THEN /swap = RAM
8G <= RAM THEN /swap = 0.75 * RAM
c) Disk space Requirement
# df -h
400 MB of disk space in the /tmp directory
Between 1.5 GB and 3.5 GB of disk space for the Oracle software, depending on the installation type
1.2 GB of disk space for a preconfigured database that uses file system storage (optional)
e.g.
lvcreate -L 102400 -n oracle /dev/VolGroup01
mkfs.ext3 /dev/VolGroup01/oracle
mount /dev/VolGroup01/oracle /u01
vi /etc/fstab(开机自动挂载)
/dev/VolGroup01/oracle /u01 ext3 defaults 0 0
2. Kernel Requirements
a) Version
# uname -r
2.6.18-53.e15
[root@htjcoa ~]# more /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1
[root@htjcoa ~]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.1
Release: 5.1
Codename: n/a
b) SELinux
SELinux has to be disabled on RHEL/OEL 5 to work Due to an internal bugs of Oracle database (Bug 6140224, Bug 6079461)
3. Installing required packages
rpm -q binutils-2.17.50 (x86_64)
rpm -q compat-db-4.2.52 (x86_64)
rpm -q compat-libstdc++-296(i386)
rpm -q compat-libstdc++-33-3.2.3 (x86_64)
rpm -q compat-libstdc++-33-3.2.3(i386)
rpm -q control-center-2.16.0 (x86_64)
rpm -q gcc-4.1.1 (x86_64)
rpm -q gcc-c++-4.1.1 (x86_64)
rpm -q glibc-2.5-12 (x86_64)
rpm -q glibc-2.5-12 (i686)
rpm -q glibc-common-2.5-12 (x86_64)
rpm -q glibc-devel-2.5-12 (x86_64)
rpm -q glibc-devel-2.5-12(i386)
rpm -q glibc-headers-2.5-12 (x86_64)
rpm -q ksh-20060214-1.4 (x86_64)
rpm -q libaio-0.3.96 (x86_64)
rpm -q libgcc-4.1.1(i386)
rpm -q libgcc-4.1.1(x86_64)
rpm -q libgnome-2.16.0 (x86_64)
rpm -q libgnomeui-2.16.0 (x86_64)
rpm -q libgomp-4.1.1 (x86_64)
rpm -q libstdc++-4.1.1 (x86_64)
rpm -q libstdc++-devel-4.1.1 (x86_64)
rpm -q libXp-1.0.0-8 (i386)
rpm -q make-3.81 (x86_64)
rpm -q sysstat-7.0.0 (x86_64)
4. set kernel parameters
[root@htjcoa Server]#vi /etc/sysctl.conf
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65500(10.2.0.4) 注意:10.2.0.5的时候是net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
[root@htjcoa Server]## sysctl -p --使其生效
5. Create Oracle user and groups
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# passwd oracle
6. Create the required directories for Oracle database and change the ownership
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
7. Set the session limits for Oracle user
(a) /etc/security/limits.conf
[root@htjcoa Server]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
(b) /etc/pam.d/login
[root@htjcoa Server]# vi /etc/pam.d/login
session required pam_limits.so
(c) /etc/profile
[root@htjcoa Server]# vi /etc/profile
if [ $USER = "oracle" ]; then
ulimit -u 16384
ulimit -n 65536
fi
8. Configure the Oracle user's environment
[root@htjcoa ~]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost --注意:127这行要去掉主机名,切忌!否则检查会报错
::1 localhost6.localdomain6 localhost6
10.1.93.91 htjcoa
[root@htjcoa ~]# more .bash_profile
9. 修改/etc/redhat-release文件
Oracle10gR2 (10.2) was released before RHEL5, so the base installation media does not make provision for installing on RHEL5.
由于10.2发布的时候,RHEL5还没有出,所以.runInstaller不支持RHEL5,那么修改/etc/redhat-release把5.1修改成4,就不会验证出问题了。
安装完数据库软件以后,就可以把这个参数再改回去,因为10.2.0.4的patch是支持RHEL5的。
另外一个需要大家注意的地方是,不要在原有基础上使用#注释,oracle不认识,要彻底修改,我先前是#注释掉第一行,然后新建,结果验证失败了。
[root@htjcoa ~]# vi /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 -> Red Hat Enterprise Linux Server release 4
$ ./runInstaller
最后,借此机会对“大川”同志表示感谢,如果没有他的帮忙,我估计我这次安装oracle将成为终身难忘的经历~~~
参考文献:
1. Requirements For Installing Oracle10gR2 On RHEL 5/OEL 5 (x86_64) [ID 421308.1]
2. Prerequisite Checks Fail When Installing 10.2 On Red Hat 5 (RHEL5) [ID 456634.1]
3. http://space.itpub.net/9252210/viewspace-662357
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9252210/viewspace-662625/ ,如需转载,请注明出处,否则将追究法律责任。