且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CentOS 5.2下oracle 10g安装详解

更新时间:2022-09-14 22:56:40

实验环境:

CentOS 5.2 x86_64

10201_database_linux_x86_64

 

一,下载oracle并解压:

oracle下载地址:

http://www.oracle.com/technetwork/database/10201linx8664soft-092456.html

 

[root@www opt]# ll

total 741388

-rw-r--r-- 1 root root 758433170 Sep  9  2010 10201_database_linux_x86_64.cpio.gz

[root@www opt]# gunzip 10201_database_linux_x86_64.cpio.gz

[root@www opt]# cpio -idmv < 10201_database_linux_x86_64.cpio

[root@www opt]# ll

total 783592

-rw-r--r-- 1 root  root  801603584 Sep  9  2010 10201_database_linux_x86_64.cpio

drwxr-xr-x 6 94110 42424      4096 Oct 23  2005 database

 

 

 

二,建立oracle组、DBA组以及oracle用户:

[root@www database]# groupadd oinstall && groupadd dba

[root@www database]# useradd -g oinstall -G dba oracle

 

 

 

三,建立安装目录:

[root@www ~]# mkdir -p /opt/oracle

[root@www ~]# chown -R oracle:dba /opt/oracle/

[root@www ~]# chmod -R 755  /opt/oracle/

 

 

 

 

四,配置内核参数:

[root@www 102]# cat >> /etc/sysctl.conf <<EOF

> kernel.shmmni = 4096

> 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.wmem_max = 262144

> EOF

 [root@www ~]# sysctl -p

 

 

五,配置PAMoracle建议对每个Linux账号可以使用的进程数和打开的文件数进行限制。):

1,修改limits模块的配置文件:

[root@www database]# cat >> /etc/security/limits.conf <<EOF

> oracle  soft  nproc  2047

> oracle  hard  nproc  16384

> oracle  soft  nofile 1024

> oracle  hard  nofile 65536

> EOF

 

 

2,修改PAM客户端配置文件:

[root@www database]# cat >> /etc/pam.d/login <<EOF

> session  required  /lib/security/pam_limits.so

> EOF

 

 

 

 

六,设置环境变量及更改系统版本号:

1,设置环境变量:

[root@www database]# vi /home/oracle/.bash_profile

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_BASE=/opt/oracle

export ORACLE_HOME=/opt/oracle/product/102

export ORACLE_SID=orcl

export ORACLE_TER=xterm

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib

export DISPLAY=:0.0

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

LC_ALL=en_US.UTF-8

 

 

 

2,由于oracle 10g出来的时候,rehat 5还没有出来 ,所以要把版本名称改为4

[root@www database]# vi /etc/redhat-release

CentOS release 4 (Final)

 

 

 

 

七,切换到图形界面,执行下面的安装操作:

[root@www ~]# xhost +

[root@www ~]# su - oracle

[oracle@www ~]$ sh /usr/local/oracle/database/runInstaller

 

 注:在安装系统的时候需要把相关的开发包安装完整,尤其是与lib相关的,如果没有安装完整,可能在执行这一步的时候会出错:

CentOS 5.2下oracle 10g安装详解

 

 

CentOS 5.2下oracle 10g安装详解

 

 

CentOS 5.2下oracle 10g安装详解

 

 

CentOS 5.2下oracle 10g安装详解

 

 

CentOS 5.2下oracle 10g安装详解

 

 

CentOS 5.2下oracle 10g安装详解

 

 

CentOS 5.2下oracle 10g安装详解

 

 

CentOS 5.2下oracle 10g安装详解

 

 

 

 

注:在下面这一步的时候需要用root用户执行2个脚本:

[root@www ~]# sh /opt/oracle/oraInventory/orainstRoot.sh

[root@www ~]# sh /opt/oracle/product/102/root.sh

CentOS 5.2下oracle 10g安装详解

 

 

CentOS 5.2下oracle 10g安装详解










本文转自 trt2008 51CTO博客,原文链接:http://blog.51cto.com/chlotte/389870,如需转载请自行联系原作者