10gRAC+RHEL5U2+ASM+iscsi(2)

接上:)   不知道为什么,由ooffice copy过来的内容,格式很多都变了。

四 配置ASM

rac1配置

/etc/init.d/oracleasm 用法可查看 manpage oracleasm.init

[root@rac1 ~]# /etc/init.d/oracleasm --help

Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}

[root@rac1 ~]# /etc/init.d/oracleasm configure

Configuring the Oracle ASM library driver.


This will configure the on-boot properties of the Oracle ASM library

driver. The following questions will determine whether the driver is

loaded on boot and what permissions it will have. The current values

will be shown in brackets ('[]'). Hitting without typing an

answer will keep that current value. Ctrl-C will abort.


Default user to own the driver interface []: oracle

Default group to own the driver interface []: oinstall

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver: [ OK ]

Scanning the system for Oracle ASMLib disks: [ OK ]

[root@rac1 ~]#


rac2配置

[root@rac2 ~]# /etc/init.d/oracleasm configure

Configuring the Oracle ASM library driver.


This will configure the on-boot properties of the Oracle ASM library

driver. The following questions will determine whether the driver is

loaded on boot and what permissions it will have. The current values

will be shown in brackets ('[]'). Hitting without typing an

answer will keep that current value. Ctrl-C will abort.


Default user to own the driver interface []: oracle

Default group to own the driver interface []: oinstall

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver: [ OK ]

Scanning the system for Oracle ASMLib disks: [ OK ]

[root@rac2 ~]#


rac1配置

[root@rac1 ~]# /etc/init.d/oracleasm --help

Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}

[root@rac1 ~]# /etc/init.d/oracleasm createdisk ASM1 /dev/sdb3

Marking disk "ASM1" as an ASM disk: [ OK ]

[root@rac1 ~]# /etc/init.d/oracleasm createdisk ASM2 /dev/sdb4

Marking disk "ASM2" as an ASM disk: [ OK ]

[root@rac1 ~]# /etc/init.d/oracleasm scandisks

Scanning the system for Oracle ASMLib disks: [ OK ]

[root@rac1 ~]# /etc/init.d/oracleasm listdisks

ASM1

ASM2

[root@rac1 ~]#


rac2配置

[root@rac2 ~]# /etc/init.d/oracleasm scandisks

Scanning the system for Oracle ASMLib disks: [ OK ]

[root@rac2 ~]# /etc/init.d/oracleasm listdisks

ASM1

ASM2

[root@rac2 ~]#


五 环境设置


1.创建oracle用户与组

[root@rac1 ~]#groupadd -u 500 oinstall

[root@rac1 ~]#groupadd -u 501 dba

[root@rac1 ~]#useradd -u 500 -g oinstall -G dba -d /home/oracle -s /bin/bash oracle

[root@rac1 ~]#passwd oracle


2.rac1rac2共通的配置文件

[root@rac1 ~]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 rac1 localhost #此处rac2机解析为rac2

::1 rac16 #此处rac2机解析为rac26,作用不清楚,估计装rac的时候这条也用不上.

192.168.0.44 rac1

192.168.0.45 rac2

192.168.0.144 rac1-vip

10.0.0.44 rac1-priv

192.168.0.145 rac2-vip

10.0.0.45 rac2-priv




[root@rac1 ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 4.2 (Tikanga)


[root@rac1 ~]# cat /home/oracle/.bashrc

# .bashrc


# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi


# User specific aliases and functions

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

export ORACLE_SID=orcl1 #此处rac2机为orcl2,建库的时候库名就叫orcl,RAC会自动给结点分配编号的.

export ORACLE_BASE=/home/oracle/database

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin


[root@rac1 ~]# cat /etc/security/limits.conf |grep oracle

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

[root@rac1 ~]# cat /etc/pam.d/login

#%PAM-1.0

auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so

auth include system-auth

account required pam_nologin.so

account include system-auth

password include system-auth

# pam_selinux.so close should be the first session rule

session required pam_selinux.so close

session include system-auth

session required pam_loginuid.so

session optional pam_console.so

# pam_selinux.so open should only be followed by sessions to be executed in the user context

session required pam_selinux.so open

session optional pam_keyinit.so force revoke


session required /lib/security/pam_limits.so


[root@rac1 ~]# cat /etc/modprobe.conf

… …

options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

… …


[root@rac1 ~]# cat /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

… …


[root@rac1 ~]# cat /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.


raw /dev/raw/raw1 /dev/sdb1

raw /dev/raw/raw2 /dev/sdb2

sleep 5

chown -R oracle:oinstall /dev/raw


touch /var/lock/subsys/local

[root@rac1 ~]#


3.rac1rac2互通

注:这里仅做的是oracle用户的ssh互通。如果可能,两结点root用户也做下:)


rac1配置

rac1-> ssh-keygen -t rsa

rac1-> ssh-keygen -t dsa


rac2配置

rac2-> ssh-keygen -t rsa

rac2-> ssh-keygen -t dsa


rac1配置

rac1-> cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

rac1-> cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

rac1-> ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

rac1-> ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

rac1-> scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys


rac1rac2上测试连接。当运行以下命令时,系统不提示输入口令。

ssh rac1 date

ssh rac2 date

ssh rac1-priv date

ssh rac2-priv date

六 安装cluster软件


rac1设置

[root@rac1 ~]# mount /dev/cdrom /mnt/

[root@rac1 ~]# su - oracle

rac1-> /mnt/clusterware/runInstaller


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11780477/viewspace-624758/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11780477/viewspace-624758/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值