Redhat5.4下安装oracle10g

                           

1         修改Linux参数

(1)       修改/etc/sysctl.conf,核心参数

[root@applecat ~]#  gedit  /etc/sysctl.conf

在文件尾部添加如下内容:

# For Oracle Install

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

使配置生效:

[root@applecat ~]# /sbin/sysctl -p

(2)       修改/etc/security/limits.conf,可选

[root@applecat ~]# gedit  /etc/security/limits.conf

在文件尾部增加:

*               soft    nproc   2047

*               hard    nproc   16384

*               soft    nofile  1024

*               hard    nofile  65536

(3)      修改/etc/pam.d/login,可选

[root@applecat ~]# gedit  /etc/pam.d/login

在尾部添加一行:

session    required     /lib/security/pam_limits.so

(4)      修改/etc/profile,可选

[root@applecat ~]# gedit /etc/profile

在尾部添加:

if [ $USER = "oracle" ]; then

         if [ $SHELL = "/bin/ksh" ]; then

                 ulimit -p 16384

                 ulimit -n 65536

         else

                 ulimit -u 16384 -n 65536

         fi

fi

2         安装Linux软件包

(1)    确认所需的软件包

[root@applecat ~]# rpm -q gcc make binutils openmotif

package gcc is not installed

make-3.81-3.el5

binutils-2.17.50.0.6-12.el5

package openmotif is not installed

 

            放入虚拟镜像光盘,重启虚拟机

 

(2)     安装gcc软件包

[root@applecat ~]# cd /media/"RHEL_5.4 i386 DVD"/Server

[root@applecat Server]# pwd

/media/RHEL_5.4 i386 DVD/Server

[root@applecat Server]# rpm -ivh kernel-headers-2.6.18-164.el5.i386.rpm

[root@applecat Server]# rpm -ivh compat-glibc-headers-2.3.4-2.26.i386.rpm

[root@applecat Server]# rpm -ivh compat-glibc-2.3.4-2.26.i386.rpm

[root@applecat Server]# rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm

[root@applecat Server]# rpm -ivh compat-libf2c-34-3.4.6-4.i386.rpm

[root@applecat Server]# rpm -ivh compat-libgcc-296-2.96-138.i386.rpm

[root@applecat Server]# rpm -ivh cpp-4.1.2-46.el5.i386.rpm

[root@applecat Server]# rpm -ivh glibc-headers-2.5-42.i386.rpm

[root@applecat Server]# rpm -ivh glibc-devel-2.5-42.i386.rpm

[root@applecat Server]# rpm -ivh libgomp-4.4.0-6.el5.i386.rpm

[root@applecat Server]# rpm -ivh libstdc++-devel-4.1.2-46.el5.i386.rpm

[root@applecat Server]# rpm -ivh gcc-4.1.2-46.el5.i386.rpm

[root@applecat Server]# rpm -ivh compat-gcc-34-3.4.6-4.i386.rpm

[root@applecat Server]# rpm -ivh compat-gcc-34-c++-3.4.6-4.i386.rpm

(3)     安装openmotif软件包

[root@applecat Server]# rpm -Uvh libXp-1.0.0-8.1.el5.i386.rpm

[root@applecat Server]# rpm -Uvh openmotif-2.3.1-2.el5.i386.rpm

(4)     再次检查包安装

[root@applecat Server]# rpm -q gcc make binutils openmotif

gcc-4.1.2-46.el5

make-3.81-3.el5

binutils-2.17.50.0.6-12.el5

openmotif-2.3.1-2.el5

(5)     检查其它包安装情况

[root@applecat Server]# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc /

> compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel

gcc-4.1.2-46.el5

make-3.81-3.el5

binutils-2.17.50.0.6-12.el5

openmotif-2.3.1-2.el5

setarch-2.0-1.1

package compat-db is not installed

package compat-gcc is not installed

package compat-gcc-c++ is not installed

package compat-libstdc++ is not installed

package compat-libstdc++-devel is not installed

(6)     安装其它包。

[root@applecat Server]# rpm -Uvh compat-db-4*

 

 

3         关闭Linux防火墙

[root@applecat ~]# gedit /etc/selinux/config

编辑:

SELINUX=disabled

4         重启Linux

5         创建oracle用户和组,并修改oracle用户密码。

[root@applecat ~]# groupadd oinstall

[root@applecat ~]# groupadd dba

[root@applecat ~]# useradd -m -g oinstall -G dba oracle

[root@applecat ~]# id oracle

uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba) context=root:system_r:unconfined_t:SystemLow-SystemHigh

[root@applecat ~]# passwd oracle

Changing password for user oracle.

New UNIX password:

BAD PASSWORD: it is based on a dictionary word

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

6         开始安装oracle 10gR2

1 修改oracle用户os参数文件:.bash_profile

将如下内容添加到文件尾部:

# Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

 

ORACLE_BASE=/home/oracle/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME

ORACLE_SID=orcl; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=$PATH:$HOME/bin

export PATH=$PATH:/sbin

 

 

 

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

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;

export ORACLE_HOME

2)创建oracle临时安装目录

[root@applecat home]# cd /home

[root@applecat home]# mkdir orainstall

[root@applecat home]# chown oracle:oinstall orainstall

3)将oracle10g安装文件拷贝至安装目录并解压缩

拷贝下载好的oracle10g文件到/home/orainstall目录下

[root@applecat home]# su – oracle

[oracle@applecat orainstall]$ cd /home/orainstall

[oracle@applecat orainstall]$ pwd

/home/orainstall

[oracle@applecat orainstall]$ ls

10201_database_linux32.zip

[oracle@applecat orainstall]$ unzip 10201_database_linux32.zip

[oracle@applecat orainstall]$ ls

10201_database_linux32.zip  database

注意:database为安装目录

4)开始安装oracle10g

[oracle@applecat orainstall]$ cd database

[oracle@applecat database]$ pwd

/home/orainstall/database

[oracle@applecat database]$ ls

doc  install  response  runInstaller  stage  welcome.html

[oracle@applecat database]$ ./runInstaller

 

阅读更多
个人分类: Oracle学习
想对作者说点什么? 我来说一句

RedHat5.4安装Oracle10g

2011年11月23日 56KB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭