当前位置: 首页 > news >正文

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/

相关文章:

  • ORACLE 10g DataGuard for Linux
  • Oracle10g默认用户总结
  • standby全库rman备份文件恢复到异机
  • sqlServer2005向oracle导表,表名未显示双引号
  • 通过tg4msql 查询无反应
  • 10g日志挖掘logmnr
  • dbca建库按百分比分内存最大10G疑问
  • oracle 10g 索引监控
  • ASM kfed工具的部分说明
  • sqlplus uptime过久事件
  • RMAN-06207 rman恢复数据库后备份delete出错
  • RMAN异库恢复之EM(1)
  • RMAN异库恢复之EM(2)遭遇 2010/12/31 root认证过期 bug
  • 丢失redo log的恢复
  • RMAN异库恢复之EM(3)
  • [Vue CLI 3] 配置解析之 css.extract
  • CSS实用技巧干货
  • JavaScript类型识别
  • Laravel 实践之路: 数据库迁移与数据填充
  • Linux链接文件
  • Netty 框架总结「ChannelHandler 及 EventLoop」
  • uni-app项目数字滚动
  • vue和cordova项目整合打包,并实现vue调用android的相机的demo
  • 百度贴吧爬虫node+vue baidu_tieba_crawler
  • 笨办法学C 练习34:动态数组
  • 工程优化暨babel升级小记
  • 欢迎参加第二届中国游戏开发者大会
  • 扑朔迷离的属性和特性【彻底弄清】
  • 普通函数和构造函数的区别
  • 让你成为前端,后端或全栈开发程序员的进阶指南,一门学到老的技术
  • 如何使用 JavaScript 解析 URL
  • 山寨一个 Promise
  • 首页查询功能的一次实现过程
  • 想晋级高级工程师只知道表面是不够的!Git内部原理介绍
  • 小程序滚动组件,左边导航栏与右边内容联动效果实现
  • 写给高年级小学生看的《Bash 指南》
  • 一道闭包题引发的思考
  • 原生Ajax
  • #NOIP 2014# day.2 T2 寻找道路
  • (11)MATLAB PCA+SVM 人脸识别
  • (2)(2.4) TerraRanger Tower/Tower EVO(360度)
  • (delphi11最新学习资料) Object Pascal 学习笔记---第2章第五节(日期和时间)
  • (八)五种元启发算法(DBO、LO、SWO、COA、LSO、KOA、GRO)求解无人机路径规划MATLAB
  • (接口自动化)Python3操作MySQL数据库
  • (四)库存超卖案例实战——优化redis分布式锁
  • (未解决)macOS matplotlib 中文是方框
  • (转)项目管理杂谈-我所期望的新人
  • .net core 连接数据库,通过数据库生成Modell
  • .NET 依赖注入和配置系统
  • .Net 应用中使用dot trace进行性能诊断
  • .NET 中各种混淆(Obfuscation)的含义、原理、实际效果和不同级别的差异(使用 SmartAssembly)
  • .netcore 6.0/7.0项目迁移至.netcore 8.0 注意事项
  • .net反混淆脱壳工具de4dot的使用
  • .net网站发布-允许更新此预编译站点
  • [ JavaScript ] JSON方法