常用的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实现 蓝桥杯VIP 算法提高 扫雷
算法提高 扫雷 时间限制:1.0s 内存限制:256.0MB 问题描述 扫雷游戏你一定玩过吧!现在给你若干个n×m的地雷阵,请你计算出每个矩阵中每个单元格相邻单元格内地雷的个数,每个单元格最多有8个相 ...
- Java实现 蓝桥杯VIP 算法提高 乘法运算
算法提高 乘法运算 时间限制:1.0s 内存限制:512.0MB 问题描述 编制一个乘法运算的程序. 从键盘读入2个100以内的正整数,进行乘法运算并以竖式输出. 输入格式 输入只有一行,是两个用空格 ...
- Java实现 洛谷 P1035 级数求和
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = ...
- iOS-pthread && NSThread && iOS9网络适配
几个概念: 进程:"正在运行"应用程序(app)就是一个进程,它至少包含一个线程: 进程的作用:为应用程序开辟内存空间: 线程:CPU调度的最小单元: ...
- Java 异常处理的十个建议
前言 Java异常处理的十个建议,希望对大家有帮助~ 本文已上传github: https://github.com/whx123/JavaHome 公众号:捡田螺的小男孩 一.尽量不要使用e.pri ...
- HBase 中加盐(Salting)之后的表如何读取:Spark 篇
我们知道,HBase 为我们提供了 hbase-mapreduce 工程包含了读取 HBase 表的 InputFormat.OutputFormat 等类.这个工程的描述如下:This module ...
- java 拦截器解决xss攻击
一.xss攻击 XSS攻击通常指的是通过利用网页开发时留下的漏洞,通过巧妙的方法注入恶意指令代码到网页,使用户加载并执行攻击者恶意制造的网页程序.这些恶意网页程序通常是JavaScript,但实际上也 ...
- UWP实现第二字幕并且跟随系统的设置
话不多说,先看一下最终效果 系统设置默认 在系统设置里面更改字幕的显示效果 需求 要求播放器可以显示第二字幕,类似旁白的文字解释.比如片中出现了一个专业术语,这个时候观众可能有些疑惑.所以需要在屏幕上 ...
- deepin文件用途
Bin:二进制文件, 存放二进制文件Dev:存放外接设备,其中外接设备不能被直接使用需要挂载(启动设备)Etc:存放配置文件Home:家目录,出了root用户外的其他用户类似于Windows中的use ...
- 国外的教授都说,用这个方式21天就能学会python,这是中国速度
你尝试过吗?按照这个方式,用21天就能学会python编程. 在今年的疫情期间,在家的时间何止21天,有这样一位做财务的朋友,为了提高自己的数据分析能力,在家通过这个方式,跟着21天的规划,坚 ...