linux7 靜默安裝 11GR2 RAC

raysuen發表於2019-06-14

vi /etc/hosts
#public ip
192.168.56.71 ora71
192.168.56.72 ora72
#private ip
192.168.221.71 ora71-priv
192.168.221.72 ora72-priv
#vip
192.168.56.73 ora71-vip
192.168.56.74 ora72-vip
#scan ip
192.168.56.75 orascan
[root@ora71 ~]# systemctl stop firewalld
[root@ora71 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@ora71 ~]# setenforce 0
[root@ora71 ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
[root@ora71 ~]# getenforce
Permissive
[root@ora72 ~]# egrep -v "^#|^$" /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
[root@ora71 ~]# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.shmall =18446744073692774399
kernel.shmmax =18446744073692774399
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 = 1048576
[root@ora71 ~]# 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
[root@ora71 ~]# vi /etc/pam.d/login
session required /lib64/security/pam_limits.so
session required pam_limits.so
groupadd -g 1000 oinstall
groupadd -g 1001 dba
groupadd -g 1002 oper
groupadd -g 1003 asmadmin
groupadd -g 1004 asmoper
groupadd -g 1005 asmdba
useradd -u 1000 -g oinstall -G dba,asmdba,oper oracle
useradd -u 1001 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/gridhome
mkdir -p /u01/app/oracle
chown -R grid:oinstall /u01/app/grid
chmod -R 755 /u01/app/grid
chown -R grid:oinstall /u01/app/gridhome
chmod -R 755 /u01/app/gridhome
chown -R oracle:oinstall /u01/app/oracle
chmod -R 755 /u01/app/oracle
#編輯引數檔案
grid:
vi ~/.bash_profile
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/gridhome/product/11.2.0/grid_1
export ORACLE_SID=+ASM1
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/gridhome/product/11.2.0/grid_1
export ORACLE_SID=+ASM2
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
oracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=RACDB1
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=RACDB2
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

#配置ssh信任
grid:
cd /home/grid
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
ssh ora72 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh ora72 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys ora72:~/.ssh/authorized_keys
#驗證
ssh ora72 date;ssh ora71 date;ssh ora72-priv date;ssh ora71-priv date
oracle
cd /home/grid
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
ssh ora72 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh ora72 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys ora72:~/.ssh/authorized_keys
#驗證
ssh ora72 date;ssh ora71 date;ssh ora72-priv date;ssh ora71-priv date
yum -y install binutils compat-libstdc++-33* compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc* kernel-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libgomp libstdc++* libstdc++.i686 make sysstat unixODBC.i686 unixODBC.x86_64 unixODBC-devel.i686 unixODBC-devel.x86_64
rpm -q compat-libstdc++-33 elfutils-libelf-devel  binutils compat-libcap1 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libaio.i686 libaio libaio-devel.i686 libaio-devel libgcc.i686 libgcc libstdc++.i686 libstdc++ libstdc++-devel.i686 libstdc++-devel libXi.i686 libXi libXtst.i686 libXtst make sysstat unixODBC.i686 unixODBC unixODBC-devel unzip --qf '%{name}.%{arch}\n'


VBoxManage.exe createhd --filename "E:\Vbox\Vmechine\workspace\share_disk between71and72\asm1.vdi" --size 2048 --format VDI --variant Fixed
VBoxManage.exe createhd --filename "E:\Vbox\Vmechine\workspace\share_disk between71and72\asm2.vdi" --size 30720 --format VDI --variant Fixed
VBoxManage.exe storageattach CentOS_7-4_64bit_IP71 --storagectl "SATA" --port 1 --device 0 --type hdd --medium "E:\Vbox\Vmechine\workspace\share_disk between71and72\asm1.vdi" --mtype shareable
VBoxManage.exe storageattach CentOS_7-4_64bit_IP71 --storagectl "SATA" --port 2 --device 0 --type hdd --medium "E:\Vbox\Vmechine\workspace\share_disk between71and72\asm2.vdi" --mtype shareable
VBoxManage.exe modifyhd "E:\Vbox\Vmechine\workspace\share_disk between71and72\asm1.vdi" --type shareable
VBoxManage.exe modifyhd "E:\Vbox\Vmechine\workspace\share_disk between71and72\asm2.vdi" --type shareable
VBoxManage.exe storageattach CentOS_7-4_64bit_IP72 --storagectl "SATA" --port 1 --device 0 --type hdd --medium "E:\Vbox\Vmechine\workspace\share_disk between71and72\asm1.vdi" --mtype shareable
VBoxManage.exe storageattach CentOS_7-4_64bit_IP72 --storagectl "SATA" --port 2 --device 0 --type hdd --medium "E:\Vbox\Vmechine\workspace\share_disk between71and72\asm2.vdi" --mtype shareable
udevadm info --query=all --name=/dev/sdb
    DEVPATH=/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb
udevadm info --query=all --name=/dev/sdc
    DEVPATH=/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sdb",ENV{DEVPATH}=="/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb",SYMLINK+="oraasm-$env{DM_NAME}",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sdc",ENV{DEVPATH}=="/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc",SYMLINK+="oraasm-$env{DM_NAME}",OWNER="grid",GROUP="asmadmin",MODE="0660"
##驗證許可權和屬組
ls -Ll /dev/mapper/*
ls -Ll /dev/oraasm-*
ls -Ll /dev/dm-*
#多路徑
#/etc/multipath.conf
multipaths {
        multipath {
                wwid 36006048cd70c3e37a4a85c04d0c79c6d
                alias data1
        }
        multipath {
                wwid 36006048cb82e28ed3701a9e1eecb820a
                alias crs1
         }
         multipath {
                 wwid 3600601606a003a001eebdf56d80e0b2f
                 alias data2
         }
         multipath {
                 wwid 3600601606a003a004aebdf56fce34966
                 alias data3
         }
}
#配置udev
cd /dev/mapper
for i in `ls mpath*`; do printf "%s %s\n" "$i" "$(udevadm info --query=all --name=/dev/mapper/$i |grep -i dm_uuid)"; done
data1 E: DM_UUID=mpath-36006048cd70c3e37a4a85c04d0c79c6d
crs1 E: DM_UUID=mpath-36006048cb82e28ed3701a9e1eecb820a
data2 E: DM_UUID=mpath-3600601606a003a001eebdf56d80e0b2f
data3 E: DM_UUID=mpath-3600601606a003a004aebdf56fce34966
[root@rac1 ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-36006048cd70c3e37a4a85c04d0c79c6d",SYMLINK+="oraasm-$env{DM_NAME}",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-36006048cb82e28ed3701a9e1eecb820a",SYMLINK+="oraasm-$env{DM_NAME}",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-3600601606a003a001eebdf56d80e0b2f",SYMLINK+="oraasm-$env{DM_NAME}",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-3600601606a003a004aebdf56fce34966",SYMLINK+="oraasm-$env{DM_NAME}",OWNER="grid",GROUP="asmadmin",MODE="0660"
#重啟udev服務
systemctl restart systemd-udev-trigger.service
##驗證許可權和屬組
ls -Ll /dev/mapper/*
ls -Ll /dev/oraasm-*
ls -Ll /dev/dm-*
[root@ora71 ~]# rpm -ivh /home/grid/grid/rpm/cvuqdisk-1.0.9-1.rpm
Preparing...                          ################################# [100%]
ls: cannot access /usr/sbin/smartctl: No such file or directory
/usr/sbin/smartctl not found.
error: %pre(cvuqdisk-1.0.9-1.x86_64) scriptlet failed, exit status 1
error: cvuqdisk-1.0.9-1.x86_64: install failed
[root@ora71 ~]# yum install smartmontools
./runcluvfy.sh stage -pre crsinst -n ora71,ora72 -fixup -verbose >> check.txt
#安裝響應檔案解釋:
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
# 修改1:當前安裝節點的計算機名稱----------------------------------------------(重點注意1)
ORACLE_HOSTNAME=rac1
# 修改2:版本資訊路徑(路徑相關可以不修改)
INVENTORY_LOCATION=/u01/app/oraInventory
# 修改3:語言,多選用,隔開(正常來說保持預設即可)
SELECTED_LANGUAGES=en,zh_CN
#4個選項提供,表示要做的操作
#   - CRS_CONFIG : To configure Grid Infrastructure for cluster
#   - HA_CONFIG  : To configure Grid Infrastructure for stand alone server
#   - UPGRADE    : To upgrade clusterware software of earlier release
#   - CRS_SWONLY : To install clusterware files only (can be configured for cluster
#                or stand alone server later)
oracle.install.option=CRS_CONFIG
# 修改4:grid 的 BASE 和 HOME 目錄(路徑相關可以不修改)
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/11.2.0/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
# 修改5:scan名稱,和hosts對應--------------------------------------------------(重點注意2)
oracle.install.crs.config.gpnp.scanName=rac-scan
# 修改6:叢集監聽埠號---------------------------------------------------------(重點注意3)
oracle.install.crs.config.gpnp.scanPort=1521
# 修改7:cluster名稱,可以保持預設
oracle.install.crs.config.clusterName=rac-cluster
#configureGNS為false,表示不配置GNS
#autoConfigureClusterNodeVIP這個引數為配置GNS後續引數之一,如果不開啟GNS,這裡指定false
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.gpnp.gnsSubDomain=
oracle.install.crs.config.gpnp.gnsVIPAddress=
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
# 修改8:節點資訊,跟hosts對應---------------------------------------------------(重點注意4)
oracle.install.crs.config.clusterNodes=rac1:rac1-vip,rac2:rac2-vip
# 修改9:網路卡資訊和網段,對應ifconfig結果(兩個節點的網路卡名稱需要一致)----------(重點注意5),1代表public,2代表private,3代表在群集中不使用該網路卡
oracle.install.crs.config.networkInterfaceList=eth0:10.0.1.0:1,eth1:11.11.11.0:2
# 儲存形式,使用ASM的話保持預設即可(可以不修改),2個值提供
#   - ASM_STORAGE
#   - FILE_SYSTEM_STORAGE
oracle.install.crs.config.storageOption=ASM_STORAGE
#這項只和windows有關,空著吧
oracle.install.crs.config.sharedFileSystemStorage.diskDriveMapping=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=NORMAL
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=NORMAL
oracle.install.crs.config.useIPMI=false
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=
# SYS密碼
oracle.install.asm.SYSASMPassword=asmadmin
# 修改10:表決盤名稱(可以不修改)
oracle.install.asm.diskGroup.name=OCR
# 修改11:表決盤冗餘選項(接受以下3個選項)-----------------------------------------(重點注意6)
# HIGH            高冗餘:最少5塊磁碟,Oracle ASM預設提供三重映象。可以容忍在不同故障組中丟失兩個Oracle ASM磁碟。
# NORMAL        正常冗餘:最少3塊磁碟,Oracle ASM預設提供雙向映象,這意味著映象所有檔案,以便每個範圍有兩個副本。容許丟失一個磁碟。
# EXTERNAL        外部冗餘:最少1塊盤,由外部RAID提供冗餘。
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.AUSize=1
# 修改12:表決盤所使用的裸盤,根據需要修改------------------------------------------(重點注意7)
oracle.install.asm.diskGroup.disks=/dev/raw/raw1,/dev/raw/raw2,/dev/raw/raw5
oracle.install.asm.diskGroup.diskDiscoveryString=
# ASMSNMP密碼
oracle.install.asm.monitorPassword=asmadmin
oracle.install.crs.upgrade.clusterNodes=
oracle.install.asm.upgradeASM=false
oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
PROXY_HOST=
PROXY_PORT=0
PROXY_USER=
PROXY_PWD=
PROXY_REALM=

oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
ORACLE_HOSTNAME=ora71
INVENTORY_LOCATION=/u01/app/grid/oraInventory
SELECTED_LANGUAGES=en
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/gridhome/product/11.2.0/grid_1
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=orascan
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.clusterName=oracluster
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.gpnp.gnsSubDomain=
oracle.install.crs.config.gpnp.gnsVIPAddress=
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.clusterNodes=ora71:ora71-vip,ora72:ora72-vip
oracle.install.crs.config.networkInterfaceList=enp0s3:10.0.2.0:3,enp0s8:192.168.56.0:1,enp0s9:192.168.221.0:2,virbr0:192.168.122.0:3
oracle.install.crs.config.storageOption=ASM_STORAGE
oracle.install.crs.config.sharedFileSystemStorage.diskDriveMapping=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=NORMAL
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=NORMAL
oracle.install.crs.config.useIPMI=false
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=
oracle.install.asm.SYSASMPassword=oracle
oracle.install.asm.diskGroup.name=OCR
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=1
oracle.install.asm.diskGroup.disks=/dev/sdb
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/sd*
oracle.install.asm.monitorPassword=oracle
oracle.install.crs.upgrade.clusterNodes=
oracle.install.asm.upgradeASM=false
oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
PROXY_HOST=
PROXY_PORT=0
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
##開始安裝grid
[grid@ora71 grid]$ ./runInstaller -ignorePrereq -force -silent -responseFile /home/grid/grid_rac11G.rsp -showProgress
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 39555 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3967 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-06-14_03-34-01AM. Please wait ...[grid@ora71 grid]$ [WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
   CAUSE: The Central Inventory is located in the Oracle base.
   ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
You can find the log of this install session at:
/u01/app/grid/oraInventory/logs/installActions2019-06-14_03-34-01AM.log
Prepare in progress.
..................................................   9% Done.
Prepare successful.
Copy files in progress.
..................................................   15% Done.
..................................................   20% Done.
..................................................   25% Done.
..................................................   30% Done.
..................................................   35% Done.
..................................................   40% Done.
..................................................   45% Done.
........................................
Copy files successful.
Link binaries in progress.
Link binaries successful.
..................................................   62% Done.
Setup files in progress.
Setup files successful.
..................................................   76% Done.
Perform remote operations in progress.
..................................................   89% Done.
Perform remote operations successful.
The installation of Oracle Grid Infrastructure 11g was successful.
Please check '/u01/app/grid/oraInventory/logs/silentInstall2019-06-14_03-34-01AM.log' for more details.
..................................................   94% Done.
Execute Root Scripts in progress.
As a root user, execute the following script(s):
        1. /u01/app/grid/oraInventory/orainstRoot.sh
        2. /u01/app/gridhome/product/11.2.0/grid_1/root.sh
Execute /u01/app/grid/oraInventory/orainstRoot.sh on the following nodes:
[ora71, ora72]
Execute /u01/app/gridhome/product/11.2.0/grid_1/root.sh on the following nodes:
[ora71, ora72]
..................................................   100% Done.
Execute Root Scripts successful.
As install user, execute the following script to complete the configuration.
        1. /u01/app/gridhome/product/11.2.0/grid_1/cfgtoollogs/configToolAllCommands RESPONSE_FILE=<response_file>
        Note:
        1. This script must be run on the same host from where installer was run.
        2. This script needs a small password properties file for configuration assistants that require passwords (refer to install guide documentation).
Successfully Setup Software.
#在執行root指令碼前需要執行下面的內容
vi /usr/lib/systemd/system/ohas.service
[Unit]
Description=Oracle High Availability Services
After=syslog.target
[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always
[Install]
WantedBy=multi-user.target
#啟動服務
systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service
systemctl status ohas.service
##編輯指令碼start_ohas.sh
vi start_ohas.sh
/bin/bash
while true
do
    if [ -f /etc/init.d/init.ohasd ];then
        systemctl start ohas.service
        systemctl status ohas.service
        break
    fi
done
[root@rhel7ora11 ~]# bash start_ohas.sh
#執行指令碼
#節點一
[root@ora71 ~]# /u01/app/grid/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/grid/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/grid/oraInventory to oinstall.
The execution of the script is complete.
[root@ora71 ~]# /u01/app/gridhome/product/11.2.0/grid_1/root.sh
Check /u01/app/gridhome/product/11.2.0/grid_1/install/root_ora71_2019-06-14_03-44-22.log for the output of root script 
##再開視窗檢視日誌內容
[root@ora71 ~]# tail -f /u01/app/gridhome/product/11.2.0/grid_1/install/root_ora71_2019-06-14_03-44-22.log
Adding Clusterware entries to inittab
CRS-2672: Attempting to start 'ora.mdnsd' on 'ora71'
CRS-2676: Start of 'ora.mdnsd' on 'ora71' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'ora71'
CRS-2676: Start of 'ora.gpnpd' on 'ora71' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ora71'
CRS-2672: Attempting to start 'ora.gipcd' on 'ora71'
CRS-2676: Start of 'ora.cssdmonitor' on 'ora71' succeeded
CRS-2676: Start of 'ora.gipcd' on 'ora71' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'ora71'
CRS-2672: Attempting to start 'ora.diskmon' on 'ora71'
CRS-2676: Start of 'ora.diskmon' on 'ora71' succeeded
CRS-2676: Start of 'ora.cssd' on 'ora71' succeeded
ASM created and started successfully.
Disk Group OCR created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 546ae35122834f43bf6432b61368f647.
Successfully replaced voting disk group with +OCR.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
1. ONLINE   546ae35122834f43bf6432b61368f647 (/dev/sdb) [OCR]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'ora71'
CRS-2676: Start of 'ora.asm' on 'ora71' succeeded
CRS-2672: Attempting to start 'ora.OCR.dg' on 'ora71'
CRS-2676: Start of 'ora.OCR.dg' on 'ora71' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
#節點二
[root@ora72 ~]# /u01/app/grid/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/grid/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/grid/oraInventory to oinstall.
The execution of the script is complete.
[root@ora72 ~]# /u01/app/gridhome/product/11.2.0/grid_1/root.sh
Check /u01/app/gridhome/product/11.2.0/grid_1/install/root_ora72_2019-06-14_03-57-52.log for the output of root script
##再開視窗檢視指令碼執行詳細內容
[root@ora72 ~]# tail -f /u01/app/gridhome/product/11.2.0/grid_1/install/root_ora72_2019-06-14_03-57-52.log
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/gridhome/product/11.2.0/grid_1/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to inittab
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node ora71, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
#在安裝節點(節點一)的grid使用者執行配置指令碼
[grid@ora71 grid]$ /u01/app/gridhome/product/11.2.0/grid_1/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/home/grid/grid_rac11G.rsp
Setting the invPtrLoc to /u01/app/gridhome/product/11.2.0/grid_1/oraInst.loc
perform - mode is starting for action: configure
perform - mode finished for action: configure
You can see the log file: /u01/app/gridhome/product/11.2.0/grid_1/cfgtoollogs/oui/configActions2019-06-14_04-13-15-AM.log
#檢視叢集狀態
[grid@ora71 grid]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.OCR.dg
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.asm
               ONLINE  ONLINE       ora71                    Started             
               ONLINE  ONLINE       ora72                    Started             
ora.gsd
               OFFLINE OFFLINE      ora71                                        
               OFFLINE OFFLINE      ora72                                        
ora.net1.network
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.ons
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ora71                                        
ora.cvu
      1        ONLINE  ONLINE       ora71                                        
ora.oc4j
      1        ONLINE  ONLINE       ora71                                        
ora.ora71.vip
      1        ONLINE  ONLINE       ora71                                        
ora.ora72.vip
      1        ONLINE  ONLINE       ora72                                        
ora.scan1.vip
      1        ONLINE  ONLINE       ora71
     
#建立磁碟組
[grid@ora71 grid]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Fri Jun 14 04:16:59 2019
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
SQL> conn / as sysasm
Connected.
SQL> create diskgroup DATA01 external redundancy disk '/dev/sdc';
Diskgroup created.
SQL> set linesize 300
SQL> select NAME,TOTAL_MB/1024 "TOTAL/G",FREE_MB/1024 "FREE/G",round(FREE_MB/TOTAL_MB*100)||'%' Per_Free,state from v$asm_diskgroup;
NAME                              TOTAL/G     FREE/G PER_FREE                                  STATE
------------------------------ ---------- ---------- ----------------------------------------- -----------
OCR                                     2 1.61328125 81%                                       MOUNTED
DATA01                                 30 29.9511719 100%                                      MOUNTED
SQL> !crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA01.dg
               ONLINE  ONLINE       ora71                                        
               OFFLINE OFFLINE      ora72                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.OCR.dg
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.asm
               ONLINE  ONLINE       ora71                    Started             
               ONLINE  ONLINE       ora72                    Started             
ora.gsd
               OFFLINE OFFLINE      ora71                                        
               OFFLINE OFFLINE      ora72                                        
ora.net1.network
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.ons
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ora71                                        
ora.cvu
      1        ONLINE  ONLINE       ora71                                        
ora.oc4j
      1        ONLINE  ONLINE       ora71                                        
ora.ora71.vip
      1        ONLINE  ONLINE       ora71                                        
ora.ora72.vip
      1        ONLINE  ONLINE       ora72                                        
ora.scan1.vip
      1        ONLINE  ONLINE       ora71   
#在節點二掛載磁碟組
root@ora71 ~]# /u01/app/gridhome/product/11.2.0/grid_1/bin/srvctl start diskgroup -g DATA01 -n ora72
[root@ora71 ~]# /u01/app/gridhome/product/11.2.0/grid_1/bin/crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA01.dg
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.OCR.dg
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.asm
               ONLINE  ONLINE       ora71                    Started             
               ONLINE  ONLINE       ora72                    Started             
ora.gsd
               OFFLINE OFFLINE      ora71                                        
               OFFLINE OFFLINE      ora72                                        
ora.net1.network
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.ons
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ora71                                        
ora.cvu
      1        ONLINE  ONLINE       ora71                                        
ora.oc4j
      1        ONLINE  ONLINE       ora71                                        
ora.ora71.vip
      1        ONLINE  ONLINE       ora71                                        
ora.ora72.vip
      1        ONLINE  ONLINE       ora72                                        
ora.scan1.vip
      1        ONLINE  ONLINE       ora71
             
#安裝rdbms
#編輯rsp檔案
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
#安裝選項,3個值可選
#   - INSTALL_DB_SWONLY   #只安裝rdbms
#   - INSTALL_DB_AND_CONFIG  #安裝rdbms和instance
#   - UPGRADE_DB           #升級安裝
oracle.install.option=INSTALL_DB_SWONLY
#指定當前安裝節點的主機名
ORACLE_HOSTNAME=ora71
UNIX_GROUP_NAME=oinstall
#指定日誌路徑
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
#指定語言,en   : English,zh_CN: Simplified Chinese。多個語言用逗號分隔
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/app/oracle
#指定安裝的版本,4個值可選
#   - EE     : Enterprise Edition                                
#   - SE     : Standard Edition                                  
#   - SEONE  : Standard Edition One
#   - PE     : Personal Edition (WINDOWS ONLY)
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=
#指定組許可權
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
#指定節點名稱,一般使用主機名
oracle.install.db.CLUSTER_NODES=ora71,ora72
#是否安裝rac一個節點
#   - true  : Value of RAC One Node service name is used.
#   - false : Value of RAC One Node service name is not used.
oracle.install.db.isRACOneInstall=false
oracle.install.db.racOneServiceName=
#指定建立的資料庫的型別
#   - GENERAL_PURPOSE/TRANSACTION_PROCESSING             
#   - DATA_WAREHOUSE   
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
#指定例項的引數,但是我們只安裝rdbms,這裡不指定
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.config.starterdb.characterSet=
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
#指定oracle support的使用者名稱和密碼
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
#指定是否不配置安裝更新
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
#編譯好的檔案
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=ora71
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.db.CLUSTER_NODES=ora71,ora72
oracle.install.db.isRACOneInstall=false
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.config.starterdb.characterSet=
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
#在安裝rdbms前,需要編輯一個指令碼,因為oracle11G在linux7上面安裝有bug
vi edit_emagent.sh
#/bin/bash
[ -f ~/.bash_profile ]&& . ~/.bash_profile
while true
do
    if [ -f $ORACLE_HOME/sysman/lib/ins_emagent.mk ];then
        sed -i 's/$(MK_EMAGENT_NMECTL)/$(MK_EMAGENT_NMECTL)-lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk
        break
    fi
done
bash edit_emagent.sh
#開始安裝rdbms
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 30631 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3965 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-06-14_05-06-03AM. Please wait ...[oracle@ora71 database]$ You can find the log of this install session at:
/u01/app/grid/oraInventory/logs/installActions2019-06-14_05-06-03AM.log
Prepare in progress.
..................................................   9% Done.
Prepare successful.
Copy files in progress.
..................................................   15% Done.
..................................................   20% Done.
..................................................   25% Done.
..................................................   30% Done.
..................................................   36% Done.
..................................................   41% Done.
..................................................   46% Done.
..................................................   51% Done.
..................................................   56% Done.
Copy files successful.
..........
Link binaries in progress.
Link binaries successful.
..................................................   77% Done.
Setup files in progress.
..................................................   94% Done.
Setup files successful.
The installation of Oracle Database 11g was successful.
Please check '/u01/app/grid/oraInventory/logs/silentInstall2019-06-14_05-06-03AM.log' for more details.
Execute Root Scripts in progress.
As a root user, execute the following script(s):
1. /u01/app/oracle/product/11.2.0/db_1/root.sh
Execute /u01/app/oracle/product/11.2.0/db_1/root.sh on the following nodes:
[ora71, ora72]
..................................................   100% Done.
Execute Root Scripts successful.
Successfully Setup Software.
#root執行指令碼
#節點一
[root@ora71 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Check /u01/app/oracle/product/11.2.0/db_1/install/root_ora71_2019-06-14_05-20-51.log for the output of root script
[root@ora71 ~]# cat /u01/app/oracle/product/11.2.0/db_1/install/root_ora71_2019-06-14_05-20-51.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_1
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Finished product-specific root actions.
#節點二
[root@ora72 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Check /u01/app/oracle/product/11.2.0/db_1/install/root_ora72_2019-06-14_05-21-34.log for the output of root script
[root@ora72 ~]# cat /u01/app/oracle/product/11.2.0/db_1/install/root_ora72_2019-06-14_05-21-34.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_1
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Finished product-specific root actions.
#建立例項
#編輯rsp檔案
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
#Valid values  : "createDatabase" \ "createTemplateFromDB" \ "createCloneTemplate" \ "deleteDatabase" \ "configureDatabase" \ "addInstance" (RAC-only) \ "deleteInstance" (RAC-only)
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
#Description   : Global database name of the database
GDBNAME = "orcl11g.us.oracle.com"
SID = "orcl11g"
#指定安裝節點的主機名,多個節點用逗號分隔
NODELIST=
TEMPLATENAME = "General_Purpose.dbc"
#指定sys和system使用者的密碼
SYSPASSWORD = "password"
SYSTEMPASSWORD = "password"
#指定資料檔案的路徑
DATAFILEDESTINATION =
#指定資料庫儲存的型別
# Valid values  : FS (CFS for RAC), ASM
STORAGETYPE=FS
#指定磁碟組名稱
DISKGROUPNAME=DATA
#指定字符集,國際字符集的預設是"AL16UTF16"
CHARACTERSET = "AL32UTF8"
NATIONALCHARACTERSET= "UTF8" 
#-----------------------------------------------------------------------------
# Name          : MEMORYPERCENTAGE
# Datatype      : String
# Description   : percentage of physical memory for Oracle
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
#MEMORYPERCENTAGE = "40"
#指定使用的記憶體
# Description   : total memory in MB to allocate to Oracle
TOTALMEMORY = "1700"
#編譯好的rsp檔案
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "RACDB"
SID = "RACDB"
NODELIST=ora71,ora72
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
DATAFILEDESTINATION = "+data01"
STORAGETYPE=ASM
DISKGROUPNAME=DATA01
CHARACTERSET = "AL32UTF8"
NATIONALCHARACTERSET= "UTF8"
TOTALMEMORY = "1700"
#建立例項
[oracle@ora71 ~]$ $ORACLE_HOME/bin/dbca -silent -responseFile /home/oracle/dbca_rac.rsp
Copying database files
1% complete
3% complete
30% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
44% complete
45% complete
48% complete
50% complete
Creating cluster database views
52% complete
70% complete
Completing Database Creation
73% complete
76% complete
85% complete
94% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/RACDB/RACDB.log" for further details
#驗證例項
[grid@ora71 grid]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA01.dg
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.OCR.dg
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.asm
               ONLINE  ONLINE       ora71                    Started             
               ONLINE  ONLINE       ora72                    Started             
ora.gsd
               OFFLINE OFFLINE      ora71                                        
               OFFLINE OFFLINE      ora72                                        
ora.net1.network
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
ora.ons
               ONLINE  ONLINE       ora71                                        
               ONLINE  ONLINE       ora72                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ora71                                        
ora.cvu
      1        ONLINE  ONLINE       ora71                                        
ora.oc4j
      1        ONLINE  ONLINE       ora71                                        
ora.ora71.vip
      1        ONLINE  ONLINE       ora71                                        
ora.ora72.vip
      1        ONLINE  ONLINE       ora72                                        
ora.racdb.db
      1        ONLINE  ONLINE       ora71                    Open                
      2        ONLINE  ONLINE       ora72                    Open                
ora.scan1.vip
      1        ONLINE  ONLINE       ora71                         
#sqlplus驗證
SQL> set linesize 300
SQL> select instance_number,instance_name,host_name,status from gv$instance;
INSTANCE_NUMBER INSTANCE_NAME    HOST_NAME                    STATUS
--------------- ---------------- ---------------------------------------------------------------- ------------
       1 RACDB1   ora71                   OPEN
       2 RACDB2   ora72                   OPEN
SQL>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28572479/viewspace-2647701/,如需轉載,請註明出處,否則將追究法律責任。

相關文章