RHEL5 安装 Oracle10g 步骤

 下面是ORACLE公司发的安装部署:

请参考:

Requirements For Installing Oracle 10gR2 On RHEL/OEL 5 (x86) [ID 419646.1]

 

 

修改时间 07-JUL-2009类型 HOWTO状态 PUBLISHED

 
    

In this Document
Goal
Solution
References


Applies to:

Oracle Server Enterprise Edition - Version: 10.2.0.1 to 10.2.0.1
Linux x86
Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.1
Intel Based Server LINUX

Goal

This document describes the installation of Oracle 10gR2 database onRedHat Enterprise Linux/Oracle Enterprise Linux5 (x86).

NOTE: RAC customers are strongly advised to review Note:414163.1 too

Solution

Installation requirements:

1. Hardware Requirements

i) Physical Memory

At least 1024MB of physical RAM is required. To determine the physical RAM size, enter the following command

# grep MemTotal /proc/meminfo


ii) Swap Space

The following table describes the relationship between installed RAM and the configured swap space requirement.

RAM

Swap Space

Between 1024 MB and 2048 MB

1.5 times the size of RAM

Between 2049 MB and 8192 MB

Equal to the size of RAM

More than 8192 MB

0.75 times the size of RAM

To determine the size of the configured swap space, enter the following command

# grep SwapTotal /proc/meminfo


iii) Disk space Requirement

·    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)

To determine the amount of free disk space on the system, enter the following command

# df -h

2. Kernel Requirements

a) Version

The system must be running the following kernel version (or a later version)

2.6.18-8

To determine whether the required kernel is installed, enter the following command:

# uname -r

b) SELinux

Due to an internal bugs of Oracle database (Bug 6140224, Bug 6079461), SELinux has to be disabled on RHEL/OEL 5 to work with Oracle database 10.2. Please refer Note 454196.1 for more information about these bugs.
To check whether SELinux is Enabled or Disabled in a system, please refer Note 432988.1
To disable SELinux, please refer Note 457458.1

3. Installing required packages

The following packages are required to be installed to have a supported to installation. It is recommended to choose a "default list of RPMs" during installation as per Note 376183.1 'Defining a "default RPMs" installation of the RHEL OS'. Please note following points while installing these packages

a) The version numbers for these packages given below are the minimum version required. If you have the packages with higher versions than the versions mentioned below, you can install the higher version packages.

b) Some of the below packages might be already part of "Default RPMs installation", and some of the packages might be already part of "base" installation of OS.

c) Some of the below packages may require other packages as dependencies. So, make sure that you have installed these packages including the dependency packages required.

binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
gcc-4.1.1-52
gcc-c++-4.1.1-52
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.e15
make-3.81-1.1
sysstat-7.0.0
unixODBC-2.2.11
unixODBC-devel-2.2.11

 

Note:

As per documentation bug 7680459, the package libXp-1.0.0-8 is also required to invoke OUI successfully.

4. Set the kernel parameters

Add the following the lines in the file
/etc/sysctl.conf

kernel.shmmni = 4096

kernel.sem=25032000100128

net.ipv4.ip_local_port_range=9000 65500

net.core.rmem_default=1048576

net.core.rmem_max=1048576

net.core.wmem_default=262144

net.core.wmem_max=262144

To place these changes into effect, execute the command

# 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 OracleBase and change the ownership

For example

# mkdir -p /u01/app/oracle

# chown -R oracle:oinstall /u01/app/oracle


7. Set the session limits for Oracle user

Add the following lines to the
/etc/security/limits.conf file

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

 

oracle hard nofile 65536


Add the following line in the
/etc/pam.d/login file

session required pam_limits.so


Add the following lines to the
/etc/profile.

if [ $USER = "oracle" ]; then

        ulimit -u 16384

        ulimit -n 65536

fi


8.Configure the Oracle user's environment

Configuring the oracle User's Environment, using the appropriate section of"Oracle Database Quick Installation Guide 10g Release 2 (10.2) for Linux x86". Note that setting $ORACLE_BASE (not $ORACLE_HOME) in the environment will ease a couple of entries in the Oracle Universal Installer.

For example, if oracle user is using bash shell, and has the home directory as /home/oracle,
The following lines to be added to /home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
unset ORACLE_HOME

9.Invoking OUI

Log in as Oracle user and start installation by any one of the following methods. This is required because Oracle 10.2 expects theOS to be RHEL 3 or RHEL/OEL 4.

Method 1:

$ ../runInstaller -ignoreSysPrereqs

Method 2:

Follow Note 456634.1

10. Warning at "Product-Specific Prerequisite Checks" screen

During the installation at the screen "Product-Specific Prerequisite Checks", OUI gives a warning that Oracle database 10g is not certified on the current operating system. If we still proceed to continue, OUI gives a dialog-box with a warning
"Some recommended prerequisite checks have failed. You might get errors during installation. Do you want to proceed?"
This warning can be ignored, if all the above requirements are satisfied.

 

 

--




裘海生 Hanson Qiu | Senior Sales Consultant| phone : +8610.8278.7746
Oracle Direct
Unit 702,Building D,Shangdi 6# Park

No.8 West Shangdi Road

Shangdi Information Industry Base,

Haidian District Beijing 100085,China

 

 

 

 

 

 

 

下面是中文的安装步骤:

安装准备:
下载文件
l         Oracle Database 10g Release 2(10.2.0.1) Software
解压文件
解压文件命令:
unzip 10201_database_linux32.zip
解压后的文件夹可能“database”或“db/Disk1”
Hosts文件
在/etc/hosts 文件中包含一个完整合法的服务器名
<IP-address> <fully-qualified-machine-name> <machine-name>
设置内核参数
在/etc/sysctl.conf中添加以下行:
#kernel.shmall = 2097152
#kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
#fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmen_max=262144
运行下面的命令应用以上OS参数
/sbin/sysctl -p
添加以下行到/ect/security/limits.conf文件中
*               soft    nproc   2047
*               hard    nproc   16384
*               soft    nofile 1024
*               hard    nofile 65536
 
如果/etc/pam.d/login文件中没有以下行,则添加以下内容:
session    required     /lib/security/pam_limits.so
修改/etc/selinux/config文件来关闭linux防火墙,确保SELINUX设置如下:
SELINUX=disabled
 
检查安装包
检查是否具备以下安装包:
make-3.79.1
gcc-3.2.3-34
glibc-2.3.2-95.20
compat-db-4.0.14-5
compat-gcc-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-libstdc++-7.3-2.96.128
compat-libstdc++-devel-7.3-2.96.128
libXp
openmotif21-2.1.30-8
setarch-1.3-1
查询所需安装包是否完整(缺少补啥)
rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel libXp
 
用以下命令安装以下包:
rpm -Uvh [包名称]
添加组和用户
groupadd oinstall
groupadd dba
groupadd oper
 
useradd -g oinstall -G dba oracle
passwd oracle
 
检查内存和磁盘
检查内存情况
# grep MemTotal /proc/meminfo
# grep SwapTotal /proc/meminfo
 
检查磁盘情况
#df -h
建立安装目录
建立oracle安装目录
#mkdir -p /u01/app/oracle/product/10.2.0/db_1
#chown -R oracle:install /u01/
# chmod -R 775 /u01/app/oracle
版本信息
因为默认rhel5.1不支持10.2,0.1,所以要修改一些参数
编辑/etc/redhat-release文件替换现在的版本信息(Red Hat Enterprise Linux Server release 5 (Tikanga))
 redhat-4
以可以通过修改安装文件oraparam.ini,添加redhat-5(二者选一即可)
# vi /10201_database_linux32/database/install/oraparam.ini
### #[Certified Versions]
Linux=redhat-3,SuSE-9,redhat-4,redhat-5,UnitedLinux-1.0,asianux-1,asianux-2]
再添加
[Linux-redhat-5.0-optional]
TEMP_SPACE=80
SWAP_SPACE=150
MIN_DISPLAY_COLORS=256
用户环境变量
以oracle用户登陆,在.bash_profile文件尾添加以下行:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
 
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
 
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
 
if [ $USER = "oracle" ]; then
 if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
 else
    ulimit -u 16384 -n 65536
 fi
fi
 
二、开始安装
以文本模式下用root登录,切换到安装目录下
#startx
#xhost +
#su - oracle
$export DISPLAY=<machin-name>:0.0
#./runInstaller
 
安装开始
1.选择安装方式
2.选择安装目录
3.选择安装类型
4.安装详细路径
5.软件要求检查
6.配置选项
7.数据库配置
8.数据库配置详情,字符集根据实际情况选择,可以选择ZHS16GBK,这样可以支持中文
9.数据库管理选项
10.数据库文件存储选项
 
11.备份和恢复选项
12.设置密码
 
13.安装
 
 
14.配置Assistants
15.数据库配置助手
16.密码管理
17.运行脚本
18.结束安装
安装结束
改回操作系统版权信息
Red Hat Enterprise Linux Server release 5 (Tikanga)
 
三、常见问题(FAQ)
错误1
在./runInstaller运行时出现,
错误描述:Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-09-25_10-54-49PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.<clinit>(Unknown Source)
at java.awt.Component.<clinit>(Unknown Source)
这个错误的出现原因是因为RatHat Enterprise Linux 5标准安装时,缺少libXp-1.0.0-8.i386.rpm包的缘故,我安装时尽管选的是全安装,还是出现这个问题。在光盘的Server文件下找到libXp-1.0.0-8.i386.rpm,在该目录下使用命令:
错误2
在oracle Universal Installer:Install过程中出现,
错误描述:
Exception String: Error in invoking target 'all_no_orcl ihsodbc' of makefile '/oracle/oracle/product/10.2.0/rdbms/lib/ins_rdbms.mk'. See '/oracle/oraInventory/logs/installActions2007-09-25_03-42-11AM.log' for details.
Exception Severity: 1
这个原因也是由于缺少相应的包compat-libstdc++-33-3.2.3-61.i386.rpm,手动安装吧。进到光盘的Sever目录下,运行下面命令:
[root@localhost  Server ]#rmp -ivh compat-libstdc++-33-3.2.3-61.i386.rpm


四、其他
l     如果没有安装盘,可到以下地址下载包
http://rpm.pbone.net/
l         Configuring Linux for the Installation of Oracle Database 10g
http://www.oracle.com/technology/obe/obe10gdb/install/linuxpreinst/linuxpreinst.htm
l         Installing Oracle Database 10g Release 2 on Linux x86
http://www.oracle.com/technology/pub/articles/smiley_10gdb_install.html
l         Installing Oracle Database 10g on Linux
http://www.oracle.com/technology/obe/obe10gdb/install/linuxinst/linuxinst.htm#o
 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值