Chinaunix首页 | 论坛 | 博客
  • 博客访问: 103678081
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-04-28 22:27:17

 
文章来源数据库在线 作者Jeffrey …

文件: /etc/hosts

我们的 RAC 集群中的节点的所有机器 /IP 项。

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

192.168.1.100 linux1

192.168.2.100 int-linux1

192.168.1.101 linux2

192.168.2.101 int-linux2

192.168.1.102 alex

192.168.1.105 bartman

文件: /etc/hosts.equiv

允许在不需要口令的情况下以 oracle 用户帐号登录到每个节点。

+linux1 oracle

+linux2 oracle

+int-linux1 oracle

+int-linux2 oracle

文件: /etc/grub.conf

确定在启动节点时使用哪个内核。

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE:You have a /boot partition.This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,0)

# kernel /vmlinuz-version ro root=/dev/hda3

# initrd /initrd-version.img

#boot=/dev/hda

default=0

timeout=10

splashimage=(hd0,0)/grub/splash.xpm.gz

title Fedora Core ( 2.4.21 -9.0.1.ELorafw1)

root (hd0,0)

kernel /vmlinuz- 2.4.21 -9.0.1.ELorafw1 ro root=LABEL=/ rhgb

initrd /initrd- 2.4.21 -9.0.1.ELorafw1.img

title Fedora Core ( 2.4.22 -1.2115.nptl)

root (hd0,0)

kernel /vmlinuz- 2.4.22 -1.2115.nptl ro root=LABEL=/ rhgb

initrd /initrd- 2.4.22 -1.2115.nptl.img

文件: /etc/rc.local

这些命令负责将卷绑定到原始设备、内核设定点、激活卷组、创建符号链接 — 所有这些都是为了准备每个节点的共享存储器。

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

vgscan

vgchange -a y

# +---------------------------------------------------------+

# | SHARED MEMORY |

# +---------------------------------------------------------+

echo "2147483648" > /proc/sys/kernel/shmmax

echo "4096" > /proc/sys/kernel/shmmni

# +---------------------------------------------------------+

# | SEMAPHORES |

# | ---------- |

# | |

# | SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value |

# | |

# +---------------------------------------------------------+

echo "256 32000 100 128" > /proc/sys/kernel/sem

# +---------------------------------------------------------+

# | FILE HANDLES |

# ----------------------------------------------------------+

echo "65536" > /proc/sys/fs/file-max

# +---------------------------------------------------------+

# | BIND ALL RAW DEVICES |

# +---------------------------------------------------------+

/usr/bin/raw /dev/raw/raw1 /dev/pv1/lvol1

/usr/bin/raw /dev/raw/raw2 /dev/pv1/lvol2

/usr/bin/raw /dev/raw/raw3 /dev/pv1/lvol3

/usr/bin/raw /dev/raw/raw4 /dev/pv1/lvol4

/usr/bin/raw /dev/raw/raw5 /dev/pv1/lvol5

/usr/bin/raw /dev/raw/raw6 /dev/pv1/lvol6

/usr/bin/raw /dev/raw/raw7 /dev/pv1/lvol7

/usr/bin/raw /dev/raw/raw8 /dev/pv1/lvol8

/usr/bin/raw /dev/raw/raw9 /dev/pv1/lvol9

/usr/bin/raw /dev/raw/raw10 /dev/pv1/lvol10

/usr/bin/raw /dev/raw/raw11 /dev/pv1/lvol11

/usr/bin/raw /dev/raw/raw12 /dev/pv1/lvol12

/usr/bin/raw /dev/raw/raw13 /dev/pv1/lvol13

/usr/bin/raw /dev/raw/raw14 /dev/pv1/lvol14

/usr/bin/raw /dev/raw/raw15 /dev/pv1/lvol15

/usr/bin/raw /dev/raw/raw16 /dev/pv1/lvol16

/usr/bin/raw /dev/raw/raw17 /dev/pv1/lvol17

/usr/bin/raw /dev/raw/raw18 /dev/pv1/lvol18

/usr/bin/raw /dev/raw/raw19 /dev/pv1/lvol19

/usr/bin/raw /dev/raw/raw20 /dev/pv1/lvol20

/usr/bin/raw /dev/raw/raw21 /dev/pv1/lvol21

/usr/bin/raw /dev/raw/raw22 /dev/pv1/lvol22

/usr/bin/raw /dev/raw/raw23 /dev/pv1/lvol23

/bin/chmod 600 /dev/raw/raw1

/bin/chmod 600 /dev/raw/raw2

/bin/chmod 600 /dev/raw/raw3

/bin/chmod 600 /dev/raw/raw4

/bin/chmod 600 /dev/raw/raw5

/bin/chmod 600 /dev/raw/raw6

/bin/chmod 600 /dev/raw/raw7

/bin/chmod 600 /dev/raw/raw8

/bin/chmod 600 /dev/raw/raw9

/bin/chmod 600 /dev/raw/raw10

/bin/chmod 600 /dev/raw/raw11

/bin/chmod 600 /dev/raw/raw12

/bin/chmod 600 /dev/raw/raw13

/bin/chmod 600 /dev/raw/raw14

/bin/chmod 600 /dev/raw/raw15

/bin/chmod 600 /dev/raw/raw16

/bin/chmod 600 /dev/raw/raw17

/bin/chmod 600 /dev/raw/raw18

/bin/chmod 600 /dev/raw/raw19

/bin/chmod 600 /dev/raw/raw20

/bin/chmod 600 /dev/raw/raw21

/bin/chmod 600 /dev/raw/raw22

/bin/chmod 600 /dev/raw/raw23

/bin/chown oracle:dba /dev/raw/raw1

/bin/chown oracle:dba /dev/raw/raw2

/bin/chown oracle:dba /dev/raw/raw3

/bin/chown oracle:dba /dev/raw/raw4

/bin/chown oracle:dba /dev/raw/raw5

/bin/chown oracle:dba /dev/raw/raw6

/bin/chown oracle:dba /dev/raw/raw7

/bin/chown oracle:dba /dev/raw/raw8

/bin/chown oracle:dba /dev/raw/raw9

/bin/chown oracle:dba /dev/raw/raw10

/bin/chown oracle:dba /dev/raw/raw11

/bin/chown oracle:dba /dev/raw/raw12

/bin/chown oracle:dba /dev/raw/raw13

/bin/chown oracle:dba /dev/raw/raw14

/bin/chown oracle:dba /dev/raw/raw15

/bin/chown oracle:dba /dev/raw/raw16

/bin/chown oracle:dba /dev/raw/raw17

/bin/chown oracle:dba /dev/raw/raw18

/bin/chown oracle:dba /dev/raw/raw19

/bin/chown oracle:dba /dev/raw/raw20

/bin/chown oracle:dba /dev/raw/raw21

/bin/chown oracle:dba /dev/raw/raw22

/bin/chown oracle:dba /dev/raw/raw23

# +---------------------------------------------------------+

# | CREATE SYMBOLIC LINKS |

# +---------------------------------------------------------+

mkdir /u01/app/oracle/oradata

mkdir /u01/app/oracle/oradata/orcl

ln -s /dev/raw/raw1 /u01/app/oracle/oradata/orcl/CMQuorumFile

ln -s /dev/raw/raw2 /u01/app/oracle/oradata/orcl/SharedSrvctlConfigFile

ln -s /dev/raw/raw3 /u01/app/oracle/oradata/orcl/spfileorcl.ora

ln -s /dev/raw/raw4 /u01/app/oracle/oradata/orcl/control01.ctl

ln -s /dev/raw/raw5 /u01/app/oracle/oradata/orcl/control02.ctl

ln -s /dev/raw/raw6 /u01/app/oracle/oradata/orcl/control03.ctl

ln -s /dev/raw/raw7 /u01/app/oracle/oradata/orcl/cwmlite01.dbf

ln -s /dev/raw/raw8 /u01/app/oracle/oradata/orcl/drsys01.dbf

ln -s /dev/raw/raw9 /u01/app/oracle/oradata/orcl/example01.dbf

ln -s /dev/raw/raw10 /u01/app/oracle/oradata/orcl/indx01.dbf

ln -s /dev/raw/raw11 /u01/app/oracle/oradata/orcl/odm01.dbf

ln -s /dev/raw/raw12 /u01/app/oracle/oradata/orcl/system01.dbf

ln -s /dev/raw/raw13 /u01/app/oracle/oradata/orcl/temp01.dbf

ln -s /dev/raw/raw14 /u01/app/oracle/oradata/orcl/tools01.dbf

ln -s /dev/raw/raw15 /u01/app/oracle/oradata/orcl/undotbs01.dbf

ln -s /dev/raw/raw16 /u01/app/oracle/oradata/orcl/undotbs02.dbf

ln -s /dev/raw/raw17 /u01/app/oracle/oradata/orcl/users01.dbf

ln -s /dev/raw/raw18 /u01/app/oracle/oradata/orcl/xdb01.dbf

ln -s /dev/raw/raw19 /u01/app/oracle/oradata/orcl/perfstat01.dbf

ln -s /dev/raw/raw20 /u01/app/oracle/oradata/orcl/redo01.log

ln -s /dev/raw/raw21 /u01/app/oracle/oradata/orcl/redo02.log

ln -s /dev/raw/raw22 /u01/app/oracle/oradata/orcl/redo03.log

ln -s /dev/raw/raw23 /u01/app/oracle/oradata/orcl/orcl_redo2_2.log

chown -R oracle:dba /u01/app/oracle/oradata

/sbin/insmod hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

更新 Red Hat Linux 系统( Oracle Metalink 注释 #252217.1 )(在两个节点上执行)

以下的 RPM 均在 Red Hat Fedora Core 1 CD 中提供,它们需要进行更新,方法使用在 Metalink 注释 #252217.1“ 在 RHEL3 上安装 Oracle9 i R2 的需求 ” 中说明的步骤。

所有这些程序包都需要以 root 用户安装。

在 Fedora Core 1 / 1 号盘上

# cd /mnt/cdrom/Fedora/RPMS

# rpm -Uvh libpng10- 1.0.13 -9.i386.rpm

在 Fedora Core 1 / 2 号盘上

# cd /mnt/cdrom/Fedora/RPMS

# rpm -Uvh gnome-libs- 1.4.1 .2.90-35.i386.rpm

在 Fedora Core 1 / 3 号盘上

# cd /mnt/cdrom/Fedora/RPMS

# rpm -Uvh compat-libstdc++-7.3-2.96.118.i386.rpm

# rpm -Uvh compat-libstdc++-devel-7.3-2.96.118.i386.rpm

# rpm -Uvh compat-db- 4.0.14 -2.i386.rpm

# rpm -Uvh compat-gcc-7.3-2.96.118.i386.rpm

# rpm -Uvh compat-gcc-c++-7.3-2.96.118.i386.rpm

# rpm -Uvh sysstat- 4.0.7 -5.i386.rpm

# rpm -Uvh openmotif21- 2.1.30 -8.i386.rpm

# rpm -Uvh pdksh- 5.2.14 -23.i386.rpm

在 PATH 中设置 gcc296 和 g++296

首先通过创建以下的符号链接,将 gcc296 和 g++296 加入到 $PATH 变量中:

# mv /usr/bin/gcc /usr/bin/gcc323

# mv /usr/bin/g++ /usr/bin/g++323

# ln -s /usr/bin/gcc296 /usr/bin/gcc

# ln -s /usr/bin/g++296 /usr/bin/g++

检查主机名

如有必要,可对修改 /etc/hosts 文件,以确保 hostname 命令返回完全合格的主机名:

# hostname

安装 3006854 补丁: Oracle/Linux 补丁 3006854

# unzip p3006854_9204_LINUX.zip

# cd 3006854

# sh rhel3_pre_install.sh

重新启动系统

此时,在准备安装 Oracle 软件之前,重新启动 RAC 集群中的所有节点。

# init 6

阅读(241) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~