常用的rac搭建相关
平时自己测试环境搭建用,部分参数是不规范的。
生产请按照官方文档或者公司标准化文档来做。
共享硬盘:
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
scsi1.sharedBus = "virtual"
scsi1:0.deviceType = "disk"
scsi1:1.deviceType = "disk"
scsi1:2.deviceType = "disk"
scsi1:3.deviceType = "disk"
scsi1:4.deviceType = "disk"
多路径:
lsmod |grep dm_multipath
yum install device-mapper* -y
modprobe dm-multipath
modprobe dm-round-robin
service multipathd start
multipath –v2
lsmod |grep dm_multipath
chkconfig --level 345 multipathd on
搭建:
包(11g):
yum install gcc gcc-c++ glibc* glibc-devel* ksh libgcc* libstdc++* libstdc++-devel* make sysstat compat-libstdc++* elfutils-libelf-devel* libaio-devel* compat-libcap* -y
环境变量:
oracle用户:
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=zkm2 # RAC2
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/OPatch
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export DISPLAY=192.168.180.1:0.0
grid用户:
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=+ASM2 # RAC2
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/OPatch
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export DISPLAY=192.168.180.1:0.0
创建目录:
/usr/sbin/groupadd -g 1000 oinstall
/usr/sbin/groupadd -g 1020 asmadmin
/usr/sbin/groupadd -g 1021 asmdba
/usr/sbin/groupadd -g 1022 asmoper
/usr/sbin/groupadd -g 1031 dba
/usr/sbin/groupadd -g 1032 oper
useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
useradd -u 1101 -g oinstall -G dba,asmdba,oper oracle
mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/grid
mkdir /u01/app/oracle
chown -R grid:oinstall /u01
chown oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/
mkdir /soft
chown -R oracle:oinstall /soft
hosts配置:
##public
192.168.180.100 rac1.example.com rac1
192.168.180.200 rac2.example.com rac2
##private
10.10.10.100 rac1-private.example.com rac1-private
10.10.10.200 rac2-private.example.com rac2-private
##vip
192.168.180.111 rac1-vip.example.com rac1-vip
192.168.180.222 rac2-vip.example.com rac2-vip
##scan ip
192.168.180.233 scan-ip
卸载:
/usr/sbin/userdel -r grid
/usr/sbin/userdel -r oracle
/usr/sbin/groupdel dba
/usr/sbin/groupdel asmdba
/usr/sbin/groupdel asmadmin
/usr/sbin/groupdel oinstall
/usr/sbin/groupdel oper
/usr/sbin/groupdel asmoper
rm -fr /soft
rm -fr /u01
rm -rf /etc/ora*
rm -rf /tmp/.oracle
rm -rf /var/tmp/.oracle
rm -f /etc/inittab.crs
cp /etc/inittab.no_crs /etc/inittab
rm -rf /etc/init.d/init.ohasd
rm -rf /etc/init.d/ohasd
rm -rf /tmp/CVU_*
rm -rf /tmp/OraInsta*
rm -rf /opt/ORCLfmap
rm -rf /usr/local/bin/dbhome
rm -rf /usr/local/bin/oraenv
rm -rf /usr/local/bin/coraenv
systemctl daemon-reload
systemctl disable oracle-ohasd.service
systemctl daemon-reload
systemctl disable oracle-tfa.service
rm -fr /etc/systemd/system/oracle*
systemctl daemon-reload
dd if=/dev/zero of=/dev/mapper/asm-ocr1 bs=1024 count=5000
dd if=/dev/zero of=/dev/mapper/asm-ocr2 bs=1024 count=5000
dd if=/dev/zero of=/dev/mapper/asm-ocr3 bs=1024 count=5000
dd if=/dev/zero of=/dev/mapper/asm-data01 bs=1024 count=5000
dd if=/dev/zero of=/dev/mapper/asm-fra01 bs=1024 count=5000
dd if=/dev/zero of=/dev/mapper/asm-redoa bs=1024 count=5000
dd if=/dev/zero of=/dev/mapper/asm-redob bs=1024 count=5000
多路径模板:
vi /etc/multipath.conf
# This is a basic configuration file with some examples, for device mapper
# multipath.
# For a complete list of the default configuration values, see
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults
# For a list of configuration options with descriptions, see
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated
#
# REMEMBER: After updating multipath.conf, you must run
#
# service multipathd reload
#
# for the changes to take effect in multipathd
## By default, devices with vendor = "IBM" and product = "S/390.*" are
## blacklisted. To enable mulitpathing on these devies, uncomment the
## following lines.
#blacklist_exceptions {
# device {
# vendor "IBM"
# product "S/390.*"
# }
#}
## Use user friendly names, instead of using WWIDs as names.
defaults {
user_friendly_names yes
}
##
## Here is an example of how to configure some standard options.
##
#
#defaults {
# udev_dir /dev
# polling_interval 10
# path_selector "round-robin 0"
# path_grouping_policy multibus
# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
# prio alua
# path_checker readsector0
# rr_min_io 100
# max_fds 8192
# rr_weight priorities
# failback immediate
# no_path_retry fail
# user_friendly_names yes
#}
##
## The wwid line in the following blacklist section is shown as an example
## of how to blacklist devices by wwid. The 2 devnode lines are the
## compiled in default blacklist. If you want to blacklist entire types
## of devices, such as all scsi devices, you should use a devnode line.
## However, if you want to blacklist specific devices, you should use
## a wwid line. Since there is no guarantee that a specific device will
## not change names on reboot (from /dev/sda to /dev/sdb for example)
## devnode lines are not recommended for blacklisting specific devices.
##
#blacklist {
# wwid 26353900f02796769
# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
# devnode "^hd[a-z]"
#}
#multipaths {
# multipath {
# wwid 3600508b4000156d700012000000b0000
# alias yellow
# path_grouping_policy multibus
# path_checker readsector0
# path_selector "round-robin 0"
# failback manual
# rr_weight priorities
# no_path_retry 5
# }
# multipath {
# wwid 1DEC_____321816758474
# alias red
# }
#}
#devices {
# device {
# vendor "COMPAQ "
# product "HSV110 (C)COMPAQ"
# path_grouping_policy multibus
# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
# path_checker readsector0
# path_selector "round-robin 0"
# hardware_handler "0"
# failback 15
# rr_weight priorities
# no_path_retry queue
# }
# device {
# vendor "COMPAQ "
# product "MSA1000 "
# path_grouping_policy multibus
# }
#}
blacklist {
devnode "^sda"
}
multipaths {
multipath {
wwid 36000c292e4149a5b449d751406ee04da
alias asm-ocr1
}
multipath {
wwid 36000c29a0ab075db0a6c8b27e49fff55
alias asm-ocr2
}
multipath {
wwid 36000c29f9ea0f52429caf2a1b6eae066
alias asm-ocr3
}
multipath {
wwid 36000c29567d5da1685102a5b25623874
alias asm-redoa
}
multipath {
wwid 36000c29f08f7046835a3f5fd93e7e321
alias asm-redob
}
multipath {
wwid 36000c2948b7b39e405e0669dcc47bc04
alias asm-fra01
}
multipath {
wwid 36000c29c002618693a8db87af5fa091f
alias asm-data01
}
}
multipathd -k
multipathd> reconfigure
ok
udev配置:
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
ENV{DM_NAME}=="asm-data01", OWNER="grid", GROUP="asmadmin", MODE="0660",SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="asm-ocr1", OWNER="grid", GROUP="asmadmin", MODE="0660",SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="asm-ocr2", OWNER="grid", GROUP="asmadmin", MODE="0660",SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
常用的rac搭建相关的更多相关文章
- AIX下RAC搭建 Oracle10G(二)主机配置
AIX下RAC搭建系列 AIX下RAC搭建 Oracle10G(二)主机配置 环境 节点 节点1 节点2 小机型号 IBM P-series 630 IBM P-series 630 主机名 AIX2 ...
- linux下Oracle11g RAC搭建(一)
linux下Oracle11g RAC搭建(一) 文档说明 作者 深蓝 项目 Visualbox下模拟RAC搭建(双节点)(Redhat5+Oracle11G) 环境 RedHat Enterp ...
- Android开发环境搭建相关文章列表(转载)
Android开发虽然有所了解,但是一直没有搭建开发环境去学习,Android的更新速度比较快了,Android1.0是2008年发布的,截止到目前为止Android已经更新Android5.0.1, ...
- AIX下RAC搭建 Oracle10G(一)检測系统环境
AIX下RAC搭建系列 环境 节点 节点1 节点2 小机型号 IBM P-series 630 IBM P-series 630 主机名 AIX203 AIX204 交换机 SAN光纤交换机 存储 S ...
- linux下Oracle11g RAC搭建(六)
linux下Oracle11g RAC搭建(六) 五.校验安装前的环境 root身份下完毕解压grid.database安装包 [grid@node1 soft]$ su - Password: [r ...
- AIX下RAC搭建 Oracle10G(四)安装CRS
AIX下RAC搭建系列 AIX下RAC搭建Oracle10G(四)安装CRS 环境 节点 节点1 节点2 小机型号 IBM P-series 630 IBM P-series 630 主机名 AIX2 ...
- linux下Oracle11g RAC搭建(九)
linux下Oracle11g RAC搭建(九) 八.创建ASM仓储 相同在图形化界面操作 [root@node1 ~]# su - grid [grid@node1 ~]$ asmca //创 ...
- 树莓派VNC搭建相关教程+Ubuntu16.04连接vncserver灰屏问题!
树莓派VNC搭建相关教程: 为了节省money,于是我决定用VNC界面来代替显示器,为后面做C++ Qt以及Python Qt开发打下基础,我别无选择!下面开始进入正题: 1-- 下载VNC-View ...
- linux下Oracle11g RAC搭建(二)
linux下Oracle11g RAC搭建(二) 一.安装前配置 网络的配置 IP占用測试 进入windows下.运行cmd,使用ping命令验证网段是否被占用. 注:用哪个网段都行,一定保证不要被其 ...
随机推荐
- Java实现 LeetCode 282 给表达式添加运算符
282. 给表达式添加运算符 给定一个仅包含数字 0-9 的字符串和一个目标值,在数字之间添加二元运算符(不是一元)+.- 或 * ,返回所有能够得到目标值的表达式. 示例 1: 输入: num = ...
- java实现连续数的公倍数
为什么1小时有60分钟,而不是100分钟呢?这是历史上的习惯导致. 但也并非纯粹的偶然:60是个优秀的数字,它的因子比较多. 事实上,它是1至6的每个数字的倍数.即1,2,3,4,5,6都是可以除尽6 ...
- java实现迷宫问题
迷宫问题 对于走迷宫,人们提出过很多计算机上的解法.深度优先搜索.广度优先搜索是使用最广的方法.生活中,人们更 愿意使用"紧贴墙壁,靠右行走"的简单规则. 58 下面的代码则采用了 ...
- (二)CRLF注入
01 漏洞描述 在<HTTP | HTTP报文>一文中,我们介绍了HTTP报文的结构:状态行和首部中的每行以CRLF结束,首部与主体之间由一空行分隔.或者理解为首部最后一个字段有两个CRL ...
- 一文带你快速搞懂动态字符串SDS,面试不再懵逼
目录 redis源码分析系列文章 前言 API使用 embstr和raw的区别 SDSHdr的定义 SDS具体逻辑图 SDS的优势 更快速的获取字符串长度 数据安全,不会截断 SDS关键代码分析 获取 ...
- js实现点击切换checkbox背景图片
在制作网页的过程中,经常需要实现点击切换背景图片的效果,本文关注的是表单中checkbox背景图片切换的实现.如图,在输入用户名和密码后,用户需要选择是否记住密码 图片背景为白色表示未勾选状态 ,背景 ...
- DES/3DES/AES 三种对称加密算法实现
1. 简单介绍 3DES(或称为Triple DES)是三重数据加密算法(TDEA,Triple Data Encryption Algorithm)块密码的通称.它相当于是对每个数据块应用三次DES ...
- MYSQL SQL 语句修改字段默认值
alter table tablename alter column drop default; (若本身存在默认值,则先删除) alter table tablename alter column ...
- SQL Beautifier & SQL2014自带的格式化工具
格式化工具(希望有几款集成在IDE中的格式化工具)为什么要说明这些,不是为说明这个工具而发,看到那几千行或集成在一起的存储过程觉得乱七八的不爽,后面将会强力训练下自己. --下面这款SQL Beaut ...
- Ubuntu 20.04下源码编译安装ROS 2 Foxy Fitzroy
ROS 2 Foxy Fitzroy(以下简称Foxy)于2020年6月5日正式发布了,是LTS版本,支持到2023年5月.本文主要根据官方的编译安装教程[1]完成,并记录编译过程中遇到的问题. 1. ...