Heim >Datenbank >MySQL-Tutorial >VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本

VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本

WBOY
WBOYOriginal
2016-06-07 17:33:571171Durchsuche

VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本

VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本

一.准备工作

1.系统信息

[root@r4r4o10n1 ~]# uname -a

Linux r4r4o10n1 2.6.9-89.EL #1 Mon Apr 2010:22:29 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

VM:vmware workstation9

OS:redhat4.8

DATABASE: ORACLE10201

2.配置网络

[root@r4o10n1 ~]# system-config-network

[root@r4o10n1 ~]# more /etc/hosts

# Do not remove the following line, orvarious programs

# that require network functionality willfail.

127.0.0.1      localhost.localdomain  localhost

192.168.150.61  r4o10n1

192.168.150.62  r4o10n2

172.168.150.61  r4o10n1-priv

172.168.150.62  r4o10n2-priv

192.168.150.63  r4o10n1-vip

192.168.150.64  r4o10n2-vip

3.需要安装的包

mount /dev/cdrom /media/cdrom

Red Hat Enterprise Linux 4.0:

以下包需要安装

binutils-2.15.92.0.2-10.EL4

compat-db-4.1.25-9

control-center-2.8.0-12

gcc-3.4.3-9.EL4

gcc-c++-3.4.3-9.EL4

glibc-2.3.4-2

glibc-common-2.3.4-2

gnome-libs-1.4.1.2.90-44.1

libstdc++-3.4.3-9.EL4

libstdc++-devel-3.4.3-9.EL4

make-3.80-5

pdksh-5.2.14-30

sysstat-5.0.5-1

xscreensaver-4.18-5.rhel4.2

有依赖关系的

rpm -ivhglibc-kernheaders-2.4-9.1.103.EL.x86_64.rpm

rpm -ivhglibc-headers-2.3.4-2.43.x86_64.rpm

rpm -ivh glibc-devel-2.3.4-2.43.x86_64.rpm

rpm -ivh gcc-3.4.6-11.x86_64.rpm

rpm -ivhlibstdc++-devel-3.4.6-11.x86_64.rpm

rpm -ivh gcc-c++-3.4.6-11.x86_64.rpm

其他的包

rpm -ivh rsh-server-0.17-25.4.x86_64.rpm

rpm -ivh glibc-devel-2.3.4-2.43.i386.rpm

wlrap需要的

rpm -ivh readline-4.3-13.i386.rpm

rpm -ivhlibtermcap-devel-2.0.8-39.x86_64.rpm

rpm -ivh readline-devel-4.3-13.x86_64.rpm

[root@r4r4o10n1 RPMS]# rpm -ivhlibtermcap-2.0.8-39.i386.rpm

asmlib需要的

rpm -ivh kernel-smp-2.6.9-89.EL.x86_64.rpm

rpm -ivhoracleasm-support-2.1.7-1.el4.x86_64.rpm

rpm -ivhoracleasm-2.6.9-89.EL-2.0.5-1.el4.x86_64.rpm

rpm -ivh oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.x86_64.rpm

rpm -ivhoracleasmlib-2.0.4-1.el4.x86_64.rpm

4.修改内核参数

[root@r4o10n1 ~]# vi /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.wmem_max=262144

让修改后的内核立即生效

[root@r4o10n1 ~]# /sbin/sysctl –p

5.设置用户资源限制,,修改limits.conf

[root@r4o10n1 ~]# vi/etc/security/limits.conf

增加以下内容(一定要带星星,不然在source .bash_profile时会报错)

*      soft    nproc  2047

*      hard    nproc  16384

*      soft    nofile  1024

*      hard    nofile  65536

6.修改login

[root@r4o10n1 ~]# vi /etc/pam.d/login

增加以下内容

session    required    /lib/security/pam_limits.so

7.修改modprobe.conf

[root@r4o10n1 ~]# vi /etc/modprobe.conf

options hangcheck-timer hangcheck_tick=30hangcheck_margin=180

让修改生效

[root@r4o10n1 ~]# modprobe -vhangcheck-timer

insmod /lib/modules/2.6.9-89.ELsmp/kernel/drivers/char/hangcheck-timer.kohangcheck_tick=30 hangcheck_margin=180

8.创建oracle组、用户、安装目录

groupadd oinstall

groupadd dba

groupadd oper

useradd -g oinstall -G dba oracle

passwd oracle

mkdir -p /oracle/product/10.2.0/crs

mkdir -p /oracle/product/10.2.0/asm

mkdir -p /oracle/product/10.2.0/db_1

chown -R oracle:oinstall /oracle

9 打开远程rsh的rlogin

rpm -ivh rsh-server-0.17-25.4.x86_64.rpm

chkconfig rsh on

chkconfig rlogin on

service xinetd reload

10. 设置oracle环境变量

export PS1="`/bin/hostname-s`->"

export EDITOR=vi

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_BASH=/oracle

exportORA_CRS_HOME=/oracle/product/10.2.0/crs

exportORACLE_HOME=/oracle/product/10.2.0/db_1

export ORACLE_SID=t10g

export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/usr/sbin:$PATH

exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

alias sqlplus="rlwrap sqlplus"

alias rman="rlwrap rman"

stty erase ^H

umask 022

更多详情见请继续阅读下一页的精彩内容:

推荐阅读:

RedHat Linux 5 & CentOS 5下Oracle 10g安装详解

CentOS 6.3(x32)下安装Oracle 10g R2

Linux-6-64下安装Oracle 12C笔记

linux

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn