以CENTOS6.8系统为例部署ORACLE11g RAC和DNS配置
本文所需要的全部文档均位于文末附录中
本文章以两个节点为例进行安装
在virtual box创建虚拟机时,网卡1为桥接网卡,网卡二为仅主机模式
创建两块磁盘,模式设置为可共享,都添加到两个虚拟机中
在虚拟介质管理中进行设置
虚拟机的创建明细如下
在两个系统安装完成后,进入network connection配置
把动态地址改为静态地址,手动输入地址、子网掩码及网关
将两个节点的公共网卡地址写入DNS server
进入 /etc/hosts 写入两个节点的网卡信息
[root@rac01 ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.101 rac01
192.168.56.102 rac02
192.168.56.111 rac01-vip
192.168.56.112 rac02-vip
192.168.1.142 rac01-priv
192.168.1.109 rac02-priv
192.168.56.156 cluster-scan
配置本地Yum源
[root@rac01 Packages]# cd /etc/yum.repos.d/
[root@rac01 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Vault.repo
[root@rac01 yum.repos.d]# rm -rf *
[root@rac01 yum.repos.d]# vi local.repo
[kingsql]
name=This is kingsql repo
baseurl=file:///rpm/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@rac01 yum.repos.d]# mkdir -p /rpm
[root@rac01 yum.repos.d]# cd /rpm
[root@rac01 rpm]cp /root/Packages/* /rpm/
rpm -ivh vsftpd-2.2.2-12.el6_5.1.x86_64.rpm
rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh libxml2-2.7.6-14.el6_5.2.x86_64.rpm
rpm -ivh libxml2-python-2.7.6-14.el6_5.2.x86_64.rpm
rpm -ivh createrepo-0.9.9-22.el6.noarch.rpm
[root@rac01 rpm]# createrepo ./
[root@rac01 rpm]# yum clean all
[root@rac01 rpm]# yum makecache
[root@rac01 rpm]#yum install -y libXp* xterm* unixODBC* sysstat* make* libstdc++* libgomp* libgcc* libaio* kernel-headers*
glibc* gcc* elfutils* binutils* bind bind-devel bind-chroot caching-nameserver compat-libcap1* compat-libstdc++-33* openssh*
xdpyinfo vi unzip
进行DNS配置
vi /etc/named.conf
options {
listen-on port 53 { any; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "/dev/null";
};
zone "kingsql.org" IN {
type master;
file "kingsql.org.zone";
};
zone "56.168.192.in-addr.arpa" {
type master;
file "192.168.56.rev";
};
[root@rac01 named]# cd /var/named
[root@rac01 named]# pwd
/var/named
[root@rac01 named]# vi kingsql.org.zone
$TTL 1D
@ IN SOA kingsql.org. hostmaster.kingsql.org. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS ns1.kingsql.org.
ns1 IN A 192.168.56.101
ns2 IN A 192.168.56.102
cluster-scan IN A 192.168.56.156
cluster-scan IN A 192.168.56.157
cluster-scan IN A 192.168.56.158
--------------------------------------------------------------------------------------------
[root@rac01 named]# vi 192.168.56.rev
$TTL 1D
@ IN SOA kingsql.org. hostmaster.kingsql.org. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS ns1.kingsql.org.
ns1 IN A 192.168.56.101
ns2 IN A 192.168.56.102
156 IN PTR cluster-scan.kingsql.org.
157 IN PTR cluster-scan.kingsql.org.
158 IN PTR cluster-scan.kingsql.org.
--------------------------------------------------------------------------------------------
service network restart
查看name server
cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.56.101
chkconfig named on ##设置开机自启动
DNS解析服务启动
service named start
Starting named: [ OK ]
nslookup cluster-scan.kingsql.org
nslookup 192.168.56.156
nslookup 192.168.56.157
nslookup 192.168.56.158
补一个rpm 包 rpm -ivh pdksh-5.2.14-30.x86_64.rpm
禁用防火墙,关闭防火墙服务
chkconfig iptables off
service iptables stop
修改selinux/config内的文件
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
创建用户和组
groupadd -g 2000 oinstall
groupadd -g 2200 asmadmin
groupadd -g 2201 asmdba
groupadd -g 2202 asmoper
groupadd -g 2300 dba
groupadd -g 2301 oper
useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" grid
useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
passwd grid
passwd oracle
修改用户和组的权限
mkdir -p /opt/ora11g/grid
mkdir -p /opt/ora11g/11.2.4/grid
chown -R grid:oinstall /opt
mkdir -p /opt/ora11g/oracle
chown oracle:oinstall /opt/ora11g/oracle
chmod -R 775 /opt
切换到oracle用户
修改环境变量
注意在配置环境变量时,两个节点的oracle_sid是不同的,要记得修改
[oracle@rac1 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/opt/ora11g/oracle
export ORACLE_HOME=/opt/ora11g/oracle/product/11.2.4/dbhome_1
export ORACLE_SID=kingsql1 #2节点是kingsql2
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=/opt/ora11g/ogg:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=/opt/ora11g/ogg:$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export LANG=C
export ORACLE_UNQNAME=kingsql
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
切换到grid用户
修改环境变量
[grid@rac1 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/opt/ora11g/grid
export ORACLE_HOME=/opt/ora11g/11.2.4/grid
export ORACLE_SID=+ASM1 #2节点是+ASM2
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
export LANG=C
切换到root用户
修改sysctl.conf文件
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
将修改从硬盘刷新到内存
/sbin/sysctl -p
修改/security/limits.conf文件
vi /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
修改pam,d/login文件
vi /etc/pam.d/login
session required pam_limits.so
关闭ntpd时间同步服务
[root@rac1 ~]# service ntpd stop
关闭 ntpd: [失败]
[root@rac1 ~]# chkconfig ntpd off
[root@rac1 ~]# mv /etc/ntp.conf /etc/ntp.conf.original
[root@rac1 ~]# rm -rf /var/run/ntpd.pid
fdisk -l查看之前添加的两块硬盘的名称
查看这两块硬盘的磁盘号
[root@rac1 ~]# /sbin/scsi_id -u -g /dev/sdb
1ATA_VBOX_HARDDISK_VB1274608b-98003b66
[root@rac1 ~]# /sbin/scsi_id -u -g /dev/sdc
1ATA_VBOX_HARDDISK_VBbf237514-f3435ff0
编写/etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB1274608b-98003b66", NAME="asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VBbf237514-f3435ff0", NAME="asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660"
复制到节点2
[root@rac1 ~]# scp /etc/udev/rules.d/99-oracle-asmdevices.rules rac02:/etc/udev/rules.d/99-oracle-asmdevices.rules
[root@rac01 ~]# start_udev
Starting udev: [ OK ]
查看添加好的磁盘
[root@rac1 ~]# ls -l /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 9月 18 11:49 /dev/asm-disk1
brw-rw---- 1 grid asmadmin 8, 32 9月 18 11:49 /dev/asm-disk2
将oracle集群件压缩包传进来,进行解压,安装解压后的集群件rpm包
[root@rac01 ~]# mv p13390677_112040_Linux-x86-64_3of7.zip /home/grid/
[grid@rac01 ~]$ cd grid/
[grid@rac01 grid]$ ls
install response runInstaller sshsetup welcome.html
readme.html rpm runcluvfy.sh stage
[grid@rac01 grid]$ cd rpm/
[grid@rac01 rpm]$ ls
cvuqdisk-1.0.9-1.rpm
[grid@rac01 rpm]$ su root
Password:
[root@rac1 ~]# rpm -ivh /home/grid/grid/rpm/cvuqdisk-1.0.9-1.rpm
Preparing... ########################################### [100%]
Using default group oinstall to install package
1:cvuqdisk ########################################### [100%]
[grid@rac01 grid]$ ./runInstaller 启动集群件安装图形化
选择跳过软件更新
选择安装和配置oracle grid infrastructure
选择高级安装
选择语言
输入scan name和端口号
添加节点2
配置ssh互信
选择oracle ASM安装
选择external不冗余,选择其中一块硬盘
设定密码
选择不使用IPM
在安装过程中需要在命令行输入脚本
输入脚本的顺序为:
节点1:脚本1
节点2:脚本1
节点1:脚本2
节点2:脚本2
之后完成集群件的安装
启动asmca
选择create
选择不冗余
选择mount all
查看crs状态(实例与监听,后面启动)
[grid@rac01 ~]$ crsctl status res -t
注销切换到Oracle用户
启动Oracle客户端程序安装
不勾选接受支持(因为不是花钱买的正版呀)
选择跳过软件更新
选择仅安装数据库软件
配置SSH
选择语言
选择企业版
这个警告是要求Ping cluster-scan。 可略过
执行安装
分别在节点1节点2上
执行脚本
/opt/ora11g/oracle/product/11.2.4/dbhome_1/root.sh
启动dbca图形化
create database
选择 Select all 输入数据库名和SID
不勾选
设定数据库口令
设定字符集
勾选第二项执行脚本
安装完成后,分别在节点一二查看实例名,验证是否安装成功
节点2Oracle用户
节点2grid用户
节点1Oracle用户
节点1grid用户
[root@rac01 Packages]# cd /etc/yum.repos.d/
[root@rac01 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Vault.repo
[root@rac01 yum.repos.d]# rm -rf *
[root@rac01 yum.repos.d]# vi local.repo
[kingsql]
name=This is kingsql repo
baseurl=file:///rpm/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@rac01 yum.repos.d]# mkdir -p /rpm
[root@rac01 yum.repos.d]# cd /rpm
[root@rac01 rpm]cp /root/Packages/* /rpm/
rpm -ivh vsftpd-2.2.2-12.el6_5.1.x86_64.rpm
rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh libxml2-2.7.6-14.el6_5.2.x86_64.rpm
rpm -ivh libxml2-python-2.7.6-14.el6_5.2.x86_64.rpm
rpm -ivh createrepo-0.9.9-22.el6.noarch.rpm
[root@rac01 rpm]# createrepo ./
[root@rac01 rpm]# yum clean all
[root@rac01 rpm]# yum makecache
[root@rac01 rpm]#yum install -y libXp* xterm* unixODBC* sysstat* make* libstdc++* libgomp* libgcc* libaio* kernel-headers*
glibc* gcc* elfutils* binutils* bind bind-devel bind-chroot caching-nameserver compat-libcap1* compat-libstdc++-33* openssh*
xdpyinfo vi unzip
-------------------------------------------------------------------------------------------
vi /etc/named.conf
options {
listen-on port 53 { any; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "/dev/null";
};
zone "kingsql.org" IN {
type master;
file "kingsql.org.zone";
};
zone "56.168.192.in-addr.arpa" {
type master;
file "192.168.56.rev";
};
[root@rac01 named]# cd /var/named
[root@rac01 named]# pwd
/var/named
[root@rac01 named]# vi kingsql.org.zone
$TTL 1D
@ IN SOA kingsql.org. hostmaster.kingsql.org. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS ns1.kingsql.org.
ns1 IN A 192.168.56.101
cluster-scan IN A 192.168.56.156
cluster-scan IN A 192.168.56.157
cluster-scan IN A 192.168.56.158
--------------------------------------------------------------------------------------------
[root@rac01 named]# vi 192.168.56.rev
$TTL 1D
@ IN SOA kingsql.org. hostmaster.kingsql.org. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS ns1.kingsql.org.
ns1 IN A 192.168.56.101
156 IN PTR cluster-scan.kingsql.org.
157 IN PTR cluster-scan.kingsql.org.
158 IN PTR cluster-scan.kingsql.org.
--------------------------------------------------------------------------------------------
service network restart
cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.56.101
chkconfig named on ##设置开机自启动
service named start
Starting named: [ OK ]
nslookup cluster-scan.kingsql.org
nslookup 192.168.56.156
nslookup 192.168.56.157
nslookup 192.168.56.158
--------------------------------------------------------------------------------------------
rpm -ivh pdksh-5.2.14-30.x86_64.rpm
chkconfig iptables off
service iptables stop
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
groupadd -g 2000 oinstall
groupadd -g 2200 asmadmin
groupadd -g 2201 asmdba
groupadd -g 2202 asmoper
groupadd -g 2300 dba
groupadd -g 2301 oper
useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" grid
useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
passwd grid
passwd oracle
mkdir -p /opt/ora11g/grid
mkdir -p /opt/ora11g/11.2.4/grid
chown -R grid:oinstall /opt
mkdir -p /opt/ora11g/oracle
chown oracle:oinstall /opt/ora11g/oracle
chmod -R 775 /opt
su - oracle
[oracle@rac1 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/opt/ora11g/oracle
export ORACLE_HOME=/opt/ora11g/oracle/product/11.2.4/dbhome_1
export ORACLE_SID=kingsql1 #2节点是kingsql2
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=/opt/ora11g/ogg:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=/opt/ora11g/ogg:$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export LANG=C
export ORACLE_UNQNAME=kingsql
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
su - grid
[grid@rac1 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/opt/ora11g/grid
export ORACLE_HOME=/opt/ora11g/11.2.4/grid
export ORACLE_SID=+ASM1 #2节点是+ASM2
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
export LANG=C
----------------------------------------------------------------------------------------------
su - root
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
/sbin/sysctl -p
vi /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
vi /etc/pam.d/login
session required pam_limits.so
[root@rac1 ~]# service ntpd stop
关闭 ntpd: [失败]
[root@rac1 ~]# chkconfig ntpd off
[root@rac1 ~]# mv /etc/ntp.conf /etc/ntp.conf.original
[root@rac1 ~]# rm -rf /var/run/ntpd.pid
[root@rac01 ~]# shutdown -h now
-------------------------------------------------------------------------------------------[root@rac01 ~]# fdisk -l
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
查磁盘号
[root@rac1 ~]# /sbin/scsi_id -u -g /dev/sdb
1ATA_VBOX_HARDDISK_VB1274608b-98003b66
[root@rac1 ~]# /sbin/scsi_id -u -g /dev/sdc
1ATA_VBOX_HARDDISK_VBbf237514-f3435ff0
[root@rac1 ~]# /sbin/scsi_id -u -g /dev/sdd
1ATA_VBOX_HARDDISK_VBc894130b-2f10eef0
[root@rac1 ~]# /sbin/scsi_id -u -g /dev/sde
1ATA_VBOX_HARDDISK_VB58f6ed82-b0dc76dc
[root@rac1 ~]# /sbin/scsi_id -u -g /dev/sdf
1ATA_VBOX_HARDDISK_VB0e0cbf34-6238f247
[root@rac1 ~]# /sbin/scsi_id -u -g /dev/sdg
1ATA_VBOX_HARDDISK_VB98788216-29530089
rac1编写文件然后copy到其他节点
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB1274608b-98003b66", NAME="asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VBbf237514-f3435ff0", NAME="asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VBc894130b-2f10eef0", NAME="asm-disk3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB58f6ed82-b0dc76dc", NAME="asm-disk4", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB0e0cbf34-6238f247", NAME="asm-disk5", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB98788216-29530089", NAME="asm-disk6", OWNER="grid", GROUP="asmadmin", MODE="0660"
[root@rac1 ~]# scp /etc/udev/rules.d/99-oracle-asmdevices.rules rac02:/etc/udev/rules.d/99-oracle-asmdevices.rules
[root@rac01 ~]# start_udev
Starting udev: [ OK ]
[root@rac1 ~]# ls -l /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 9月 18 11:49 /dev/asm-disk1
brw-rw---- 1 grid asmadmin 8, 32 9月 18 11:49 /dev/asm-disk2
brw-rw---- 1 grid asmadmin 8, 48 9月 18 11:49 /dev/asm-disk3
brw-rw---- 1 grid asmadmin 8, 64 9月 18 11:49 /dev/asm-disk4
brw-rw---- 1 grid asmadmin 8, 80 9月 18 11:49 /dev/asm-disk5
brw-rw---- 1 grid asmadmin 8, 96 9月 18 11:49 /dev/asm-disk6
[root@rac01 ~]# mv p13390677_112040_Linux-x86-64_3of7.zip /home/grid/
[grid@rac01 ~]$ cd grid/
[grid@rac01 grid]$ ls
install response runInstaller sshsetup welcome.html
readme.html rpm runcluvfy.sh stage
[grid@rac01 grid]$ cd rpm/
[grid@rac01 rpm]$ ls
cvuqdisk-1.0.9-1.rpm
[grid@rac01 rpm]$ su root
Password:
[root@rac1 ~]# rpm -ivh /home/grid/grid/rpm/cvuqdisk-1.0.9-1.rpm
Preparing... ########################################### [100%]
Using default group oinstall to install package
1:cvuqdisk ########################################### [100%]
--------------------------------------------------------------------------------------------
[root@rac01 ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.101 rac01
192.168.56.111 rac01-vip
192.168.1.229 rac01-priv
192.168.56.156 cluster-scan
[grid@rac01 grid]$ ./runInstaller
[root@rac01 ~]# /opt/ora11g/oraInventory/orainstRoot.sh
[root@rac01 ~]# /opt/ora11g/11.2.4/grid/root.sh
[root@rac01 ~]# su - grid
[grid@rac01 ~]$ crsctl status res -t
[grid@rac01 ~]$ ping cluster-scan.kingsql.org
[root@rac01 ~]# ping rac01-vip
asmca
[root@rac01 ~]# su - oracle
[oracle@rac01 ~]$
[oracle@rac01 ~]$ ls
p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip
[oracle@rac01 ~]$ unzip p13390677_112040_Linux-x86-64_1of7.zip
[oracle@rac01 ~]$ unzip p13390677_112040_Linux-x86-64_2of7.zip
[oracle@rac01 database]$ ./runInstaller
[root@rac01 ~]# /opt/ora11g/oracle/product/11.2.4/dbhome_1/root.sh
[root@rac01 ~]# su - grid
[grid@rac01 ~]$ crsctl status res -t
dbca
[root@rac01 ~]# cd /opt/ora11g/oracle/admin/kingsql/scripts/
[root@rac01 scripts]# ls
cloneDBCreation.sql init.ora postDBCreation.sql
CloneRmanRestore.sql kingsql1.sh postScripts.sql
CreateClustDBViews.sql kingsql1.sql rmanRestoreDatafiles.sql
initkingsqlTemp.ora lockAccount.sql
[root@rac01 scripts]# cat kingsql1.sql
[oracle@rac01 ~]$ sqlplus / as sysdba
SQL> show parameter db_unique
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_unique_name string kingsql
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
kingsql1
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rac01 ~]$ exit
logout
[root@rac01 scripts]# su - grid
[grid@rac01 ~]$ crsctl status res 0t
CRS-2613: Could not find resource '0t'.
[grid@rac01 ~]$ crsctl status res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE rac01
ora.LISTENER.lsnr
ONLINE ONLINE rac01
ora.OCR.dg
ONLINE ONLINE rac01
ora.asm
ONLINE ONLINE rac01 Started
ora.gsd
OFFLINE OFFLINE rac01
ora.net1.network
ONLINE ONLINE rac01
ora.ons
ONLINE ONLINE rac01
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac01
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE rac01
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE rac01
ora.cvu
1 ONLINE ONLINE rac01
ora.kingsql.db
1 ONLINE ONLINE rac01 Open
ora.oc4j
1 ONLINE ONLINE rac01
ora.rac01.vip
1 ONLINE ONLINE rac01
ora.scan1.vip
1 ONLINE ONLINE rac01
ora.scan2.vip
1 ONLINE ONLINE rac01
ora.scan3.vip
1 ONLINE ONLINE rac01
[grid@rac01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue May 15 00:59:29 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> show parameter db_unique
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_unique_name string +ASM
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
+ASM1
SQL> quit
以CENTOS6.8系统为例部署ORACLE11g RAC和DNS配置的更多相关文章
- 如何在VMware虚拟机中安装CentOS6.7系统(上篇)
之前给大家分享了在VMware中如何创建CentOS虚拟机,今天给大家分享一下如何在虚拟机中安装CentOS系统,以CentOS6.7系统为例,其他的系统版本也可以参考该教程进行类似处理,具体的流程如 ...
- Linux 系统下原版 texlive 2016 的安装与配置
尽管大部分常见的linux系统的包管理器内都会包含texlive,然而最好还是安装TUG发布的原版texlive.这是由于:1,软件仓库内的texlive通常版本较陈旧:2,由于版权因素一些tex宏包 ...
- linux CentOs 7.4 64位 系统下 nuxt部署 、nginx 安装、node环境及软连接,pm2软连接
一.nginx安装 1.安装依赖包 //一键安装上面四个依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel 2 ...
- 使用kvm虚拟出Centos6.5系统相关步骤
使用kvm虚拟出Centos6.5系统相关步骤 kvm是啥东西,亲们自行百度哇,一两句话也说不清楚,直接进主题使用宿主机虚拟出一台centos6.5的系统,当然其他系统也可以的,考虑到企业常用服务器系 ...
- Skyfree的毕业论文 《系统封装与部署的深入研究》
Skyfree的毕业论文 <系统封装与部署的深入研究> https://www.itsk.com/thread-197-1-4.html Skyfree 发表于 2007-9-13 07: ...
- 【教你玩转云计算】在阿里云一键安装快速部署Oracle11g
云计算时代提供了更方便可靠的IAAS,PAAS和SAAS平台.将已有或正在研发的项目迁移到云计算平台,和传统的服务器部署还是存在一些异同点. 本文手把手教你在阿里云平台快速的部署Oracle11g ...
- RHEL6 最小化系统 编译安装部署zabbix (mysql)
RHEL6 最小化系统 编译安装部署zabbix (mysql)官方说明详细见:https://www.zabbix.com/documentation/4.0/manual/installation ...
- 部署HBase系统(分布式部署)
1.简介 HBase系统主要依赖于zookeeper和hdfs系统,所以部署HBase需要先去部署zookeeper和hadoop 2.部署开始 IP或者HOSTNAME需要根据自身主机信息设定. 部 ...
- CentOS-6.4-DVD系统中安装Oracle-11.2.0.4
完整版见https://jadyer.github.io/2014/05/18/centos-install-oracle/ /** * CentOS-6.4-DVD系统中安装Oracle-11.2. ...
随机推荐
- Cordova开发App入门之创建android项目
Apache Cordova是一个开源的移动开发框架.允许使用标准的web技术-HTML5,CSS3和JavaScript做跨平台开发. 应用在每个平台的具体执行被封装了起来,并依靠符合标准的API绑 ...
- Git 删除操作
Tom 更新了自己的本地存储库并进入src目录下找到编译后的二进制.查看提交信息后,他意识到,编译后的二进制是由Jerry加入的. . [tom@CentOS src]$ pwd /home/tom/ ...
- psd页面切割成html技巧总结
关键字:psd切割技巧 生成html图片要点 css样式要点 rem 与高手切割后的代码对比学习提高(考察点:切割后的页面质量,源码大小及图片大小,js技术,动画技术,开发和命名规范等) 一.psd切 ...
- portfolio
1.工作量计算逻辑: 原始待办事项: 预估2个冲刺,如下图所示: Sprint1的故事点计划工作量5,空闲工作量28.如下图 Sprint2为预估冲刺,指的是预估待办事项在后续冲刺的预估计划,后续冲刺 ...
- [Artoolkit] Framework Analysis of nftSimple
What is nftSimple? Loads NFT dataset names from a configuration file. The example uses the “Pinball. ...
- BackgroundWorker学习笔记
1 简介 BackgroundWorker 类允许您在单独的专用线程上运行操作. 耗时的操作(如下载和数据库事务)在长时间运行时可能会导致用户界面 (UI) 似乎处于停止响应状态. 如果您需要能进行响 ...
- 【中间件安全】IIS7.0 安全加固规范
1. 适用情况 适用于使用IIS7进行部署的Web网站. 2. 技能要求 熟悉IIS配置操作,能够利用IIS进行建站,并能针对站点使用IIS进行安全加固. 3. 前置条件 1. 根据站点开放端口.进程 ...
- php的opcache缓存扩展
opcache (全程 zend opcache): 从php5.5开始,默认提供的php脚本缓存扩展,编译php5.5时加上参数--enable-opcache就可以编译opcache了,只是要启用 ...
- Redis 自定义 RedisAppender 插件, 实现日志缓冲队列,集中日志输出.
因为某些异步日志设置了即使队列满了,也不可丢弃,在并发高的时候,导致请求方法同步执行,响应变慢. 编写这个玩意,除了集中日志输出以外,还希望在高并发的时间点有缓冲作用. 之前用Kafka实现了一次入队 ...
- C# 解决读取dbf文件,提示Microsoft Jet 数据库引擎找不到对象的问题
前言 最新项目需要经常和dbf文件打交道,在实际场景中很多软件需要和一些老的系统进行数据交互,而这些系统都在使用foxpro数据库,读取dbf文件一般都是分为两种情况:第一:安装foxpro的驱动进行 ...