本文在ORACLE Linux 7.1上部署Oracle 12c Release2的RAC(两节点)。
零、配置
在我的这个环境中,有两台服务器作为RAC的节点。
对于每一台服务器,配置是这样的:
内存:16 GB
硬盘:66 GB
CPU:单核
网卡:三块
操作系统:OEL 7.1 64bit
一、操作系统(Linux)前期准备:
文件:/etc/hosts(所有节点)
[root@oracle12c1 ~]# cat /etc/hosts #127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 #::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 # Local 127.0.0.1 localhost # For Oracle RAC 12c Cloud Flexiable Network. # Public 10.158.1.46 oracle12c1 10.158.1.157 oracle12c2 # VIP 10.158.1.94 oracle12c1-vip 10.158.1.95 oracle12c2-vip # SCAN for Cloud 10.158.1.96 cloud-scan1 # Storage 10.158.1.47 openfiler # -------------------- # private 192.168.25.11 oracle12c1-priv 192.168.25.12 oracle12c2-priv # -------------------- # flex network 192.168.26.11 oracle12c1-flex 192.168.26.12 oracle12c2-flex # GNS VIP 192.168.26.13 gns-vip [root@oracle12c1 ~]#
网络配置:
节点一:
[root@oracle12c1 ~]# ifconfig ens32: flags=4163 mtu 1500 inet 10.158.1.46 netmask 255.255.255.0 broadcast 10.158.1.255 inet6 fe80::250:56ff:fe84:32df prefixlen 64 scopeid 0x20 ether 00:50:56:84:32:df txqueuelen 1000 (Ethernet) RX packets 4101 bytes 391951 (382.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 952 bytes 138383 (135.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens33: flags=4163 mtu 1500 inet 192.168.25.11 netmask 255.255.255.0 broadcast 192.168.25.255 inet6 fe80::250:56ff:fe84:2f5b prefixlen 64 scopeid 0x20 ether 00:50:56:84:2f:5b txqueuelen 1000 (Ethernet) RX packets 2509 bytes 219568 (214.4 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 36 bytes 4684 (4.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens34: flags=4163 mtu 1500 inet 192.168.26.11 netmask 255.255.255.0 broadcast 192.168.26.255 inet6 fe80::250:56ff:fe84:2b98 prefixlen 64 scopeid 0x20 ether 00:50:56:84:2b:98 txqueuelen 1000 (Ethernet) RX packets 2508 bytes 219214 (214.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 34 bytes 4570 (4.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 20 bytes 1780 (1.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 20 bytes 1780 (1.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@oracle12c1 ~]#
节点二:
[root@oracle12c2 ~]# ifconfig ens32: flags=4163 mtu 1500 inet 10.158.1.157 netmask 255.255.255.0 broadcast 10.158.1.255 inet6 fe80::250:56ff:fe84:31e2 prefixlen 64 scopeid 0x20 ether 00:50:56:84:31:e2 txqueuelen 1000 (Ethernet) RX packets 3518 bytes 335530 (327.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 547 bytes 81072 (79.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens33: flags=4163 mtu 1500 inet 192.168.25.12 netmask 255.255.255.0 broadcast 192.168.25.255 inet6 fe80::250:56ff:fe84:3fc8 prefixlen 64 scopeid 0x20 ether 00:50:56:84:3f:c8 txqueuelen 1000 (Ethernet) RX packets 2562 bytes 218227 (213.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 34 bytes 4536 (4.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens34: flags=4163 mtu 1500 inet 192.168.26.12 netmask 255.255.255.0 broadcast 192.168.26.255 inet6 fe80::250:56ff:fe84:36d4 prefixlen 64 scopeid 0x20 ether 00:50:56:84:36:d4 txqueuelen 1000 (Ethernet) RX packets 2558 bytes 217249 (212.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 33 bytes 4492 (4.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 20 bytes 1780 (1.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 20 bytes 1780 (1.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@oracle12c2 ~]#
LINUX:安装RPM依赖(所有节点):
yum install -y binutils.x86_64 compat-libcap1.x86_64 compat-libstdc++-33.i686 compat-libstdc++-33.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.x86_64 glibc.i686 glibc-devel.x86_64 glibc-devel.i686 ksh.x86_64 libgcc.x86_64 libgcc.i686 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libaio.x86_64 libaio.i686 libaio-devel.i686 libaio-devel.x86_64 libXext.x86_64 libXext.i686 libXtst.x86_64 libXtst.i686 libX11.x86_64 libX11.i686 libXau.x86_64 libXau.i686 libxcb.x86_64 libxcb.i686 libXi.x86_64 libXi.i686 make.x86_64 sysstat.x86_64
文件:/etc/sysctl.conf
[root@oracle12c1 ~]# cat /etc/sysctl.conf # System default settings live in /usr/lib/sysctl.d/00-system.conf. # To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file # # For more information, see sysctl.conf(5) and sysctl.d(5). # Oracle database 12c RAC fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 #kernel.shmmax = 1934714880 kernel.shmmax = 4052377600 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 #net.ipv4.ip_local_range=9000 65500 kernel.panic_on_oops = 1 net.ipv4.conf.ens33.rp_filter = 0 net.ipv4.conf.ens34.rp_filter = 2 [root@oracle12c1 ~]# [root@oracle12c1 ~]# sysctl -p fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 1934714880 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 kernel.panic_on_oops = 1 net.ipv4.conf.ens33.rp_filter = 0 net.ipv4.conf.ens34.rp_filter = 2 [root@oracle12c1 ~]#
文件:/etc/security/limits.conf
[root@oracle12c1 ~]# cat /etc/security/limits.conf # /etc/security/limits.conf # #This file sets the resource limits for the users logged in via PAM. #It does not affect resource limits of the system services. # #Also note that configuration files in /etc/security/limits.d directory, #which are read in alphabetical order, override the settings in this #file in case the domain is the same or more specific. #That means for example that setting a limit for wildcard domain here #can be overriden with a wildcard setting in a config file in the #subdirectory, but a user specific setting here can be overriden only #with a user specific setting in the subdirectory. # #Each line describes a limit for a user in the form: # # # #Where: # can be: # - a user name # - a group name, with @group syntax # - the wildcard *, for default entry # - the wildcard %, can be also used with %group syntax, # for maxlogin limit # # can have the two values: # - "soft" for enforcing the soft limits # - "hard" for enforcing hard limits # # can be one of the following: # - core - limits the core file size (KB) # - data - max data size (KB) # - fsize - maximum filesize (KB) # - memlock - max locked-in-memory address space (KB) # - nofile - max number of open file descriptors # - rss - max resident set size (KB) # - stack - max stack size (KB) # - cpu - max CPU time (MIN) # - nproc - max number of processes # - as - address space limit (KB) # - maxlogins - max number of logins for this user # - maxsyslogins - max number of logins on the system # - priority - the priority to run user process with # - locks - max number of file locks the user can hold # - sigpending - max number of pending signals # - msgqueue - max memory used by POSIX message queues (bytes) # - nice - max nice priority allowed to raise to values: [-20, 19] # - rtprio - max realtime priority # # # #* soft core 0 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 # End of file # Oracle database 12c R2 RAC grid soft nproc 2047 grid hard nproc 16384 grid soft nofile 1024 grid hard nofile 65536 grid soft stack 10240 grid hard stack 32768 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 oracle hard stack 32768 [root@oracle12c1 ~]#
文件:/etc/sysconfig/network
[root@oracle12c1 ~]# cat /etc/sysconfig/network # Created by anaconda NOZEROCONF=yes [root@oracle12c1 ~]#
文件:/etc/pam.d/login
[root@oracle12c1 ~]# cat /etc/pam.d/login #%PAM-1.0 auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so auth substack system-auth auth include postlogin 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 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 required pam_namespace.so session optional pam_keyinit.so force revoke session include system-auth session include postlogin -session optional pam_ck_connector.so # Oracle database 12c RAC session required pam_limits.so [root@oracle12c1 ~]#
创建需要的用户与组:
[root@oracle12c1 ~]# vi create_user.sh [root@oracle12c1 ~]# scp create_user.sh oracle12c2:/root root@oracle12c2's password: create_user.sh 100% 224 0.2KB/s 00:00 [root@oracle12c1 ~]# sh create_user.sh [root@oracle12c1 ~]# id oracle uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),506(asmdba) [root@oracle12c1 ~]# id grid uid=501(grid) gid=501(oinstall) groups=501(oinstall),504(asmadmin),506(asmdba),507(asmoper) [root@oracle12c1 ~]# [root@oracle12c1 ~]# echo "oracle" | passwd --stdin oracle Changing password for user oracle. passwd: all authentication tokens updated successfully. [root@oracle12c1 ~]# echo "oracle" | passwd --stdin grid Changing password for user grid. passwd: all authentication tokens updated successfully. [root@oracle12c1 ~]# [root@oracle12c1 ~]# cat create_user.sh groupadd -g 501 oinstall groupadd -g 502 dba groupadd -g 504 asmadmin groupadd -g 506 asmdba groupadd -g 507 asmoper useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper grid useradd -u 502 -g oinstall -G dba,asmdba oracle [root@oracle12c1 ~]#
环境变量:grid
[root@oracle12c1 ~]# cat /home/grid/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH export TMP=/tmp export TMPDIR=$TMP export ORACLE_HOSTNAME=oracle12c1 export ORACLE_BASE=/u01/app/grid export ORACLE_HOME=/u01/app/12/grid export ORACLE_SID=+ASM1 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 [root@oracle12c1 ~]#
环境变量:oracle
[root@oracle12c2 ~]# cat /home/oracle/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH export PATH export TMP=/tmp export TMPDIR=$TMP export ORACLE_HOSTNAME=ora12c2 export ORACLE_UNQNAME=lenka export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12/db_1 export ORACLE_SID=lenka2 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 [root@oracle12c2 ~]#
创建需要的目录结构:
[root@oracle12c1 ~]# mkdir -p /u01/app/oracle [root@oracle12c1 ~]# chown -R grid.oinstall /u01/ [root@oracle12c1 ~]# chown -R oracle.oinstall /u01/app/oracle/ [root@oracle12c1 ~]# chmod -R 755 /u01/ [root@oracle12c1 ~]# [root@oracle12c1 ~]# su - grid [grid@oracle12c1 ~]$ mkdir -p $ORACLE_BASE [grid@oracle12c1 ~]$ mkdir -p $ORACLE_HOME [grid@oracle12c1 ~]$ exit logout [root@oracle12c1 ~]# su - oracle [oracle@oracle12c1 ~]$ mkdir -p $ORACLE_HOME [oracle@oracle12c1 ~]$ exit logout [root@oracle12c1 ~]#
关闭防火墙与SELINUX:
[root@oracle12c1 ~]# sestatus SELinux status: disabled [root@oracle12c1 ~]# [root@oracle12c1 ~]# systemctl status firewalld firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled) Active: inactive (dead) [root@oracle12c1 ~]#
时间服务:
各个节点的时间需要一致。
Oracle ASMLib支持:
http://www.oracle.com/technetwork/server-storage/linux/downloads/index.html
上传服务器 并 安装:
[root@oracle12c1 ~]# mkdir /software [root@oracle12c1 ~]# cd /software/ [root@oracle12c1 software]# ls -ltr total 0 drwxr-xr-x 2 root root 96 Mar 29 23:54 oracle_asm [root@oracle12c1 software]# cd oracle_asm/ [root@oracle12c1 oracle_asm]# ls -ltr total 100 -rw-r--r-- 1 root root 19360 Mar 29 23:54 oracleasmlib-2.0.12-1.el7.x86_64.rpm -rw-r--r-- 1 root root 80968 Mar 29 23:54 oracleasm-support-2.1.8-3.el7.x86_64.rpm [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# rpm -ivh *.rpm Preparing... ################################# [100%] Updating / installing... 1:oracleasm-support-2.1.8-3.el7 ################################# [ 50%] Note: Forwarding request to 'systemctl enable oracleasm.service'. ln -s '/usr/lib/systemd/system/oracleasm.service' '/etc/systemd/system/multi-user.target.wants/oracleasm.service' 2:oracleasmlib-2.0.12-1.el7 ################################# [100%] [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# scp * oracle12c2:/software root@oracle12c2's password: oracleasmlib-2.0.12-1.el7.x86_64.rpm 100% 19KB 18.9KB/s 00:00 oracleasm-support-2.1.8-3.el7.x86_64.rpm 100% 79KB 79.1KB/s 00:00 [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# oracleasm -V oracleasm version 2.1.9 [root@oracle12c1 oracle_asm]#
这样就安装好了。
配置ORACLE ASMLib:
[root@oracle12c1 oracle_asm]# /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 []: grid Default group to own the driver interface []: asmadmin 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@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [root@oracle12c1 oracle_asm]#
iSCSI支持:
RPM:
yum install -y iscsi-initiator-utils.x86_64
安装好了以后,添加:
[root@oracle12c1 oracle_asm]# iscsiadm -m discovery -t sendtargets -p openfiler 10.158.1.47:3260,1 oracle12crac [root@oracle12c1 oracle_asm]# iscsiadm -m node -T oracle12crac -p openfiler -l Logging in to [iface: default, target: oracle12crac, portal: 10.158.1.47,3260] (multiple) Login to [iface: default, target: oracle12crac, portal: 10.158.1.47,3260] successful. [root@oracle12c1 oracle_asm]#
对共享存储分区:
OCR + GIMR:40G
[root@oracle12c1 oracle_asm]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 66G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 65.5G 0 part ├─ol-root 252:0 0 39.6G 0 lvm / ├─ol-swap 252:1 0 6.6G 0 lvm [SWAP] └─ol-home 252:2 0 19.3G 0 lvm /home sdb 8:16 0 43.9G 0 disk sr0 11:0 1 3.5G 0 rom [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# fdisk -l /dev/sdb Disk /dev/sdb: 47.1 GB, 47076868096 bytes, 91947008 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x61c4807a Device Boot Start End Blocks Id System [root@oracle12c1 oracle_asm]#
开始分区:
[root@oracle12c1 oracle_asm]# fdisk /dev/sdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sdb: 47.1 GB, 47076868096 bytes, 91947008 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x61c4807a Device Boot Start End Blocks Id System Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-91947007, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-91947007, default 91947007): +40G Partition 1 of type Linux and of size 40 GiB is set Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# fdisk -l /dev/sdb Disk /dev/sdb: 47.1 GB, 47076868096 bytes, 91947008 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x61c4807a Device Boot Start End Blocks Id System /dev/sdb1 2048 83888127 41943040 83 Linux [root@oracle12c1 oracle_asm]# [root@oracle12c1 ~]# fdisk /dev/sdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sdb: 47.1 GB, 47076868096 bytes, 91947008 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x61c4807a Device Boot Start End Blocks Id System /dev/sdb1 2048 83888127 41943040 83 Linux Command (m for help): n Partition type: p primary (1 primary, 0 extended, 3 free) e extended Select (default p): p Partition number (2-4, default 2): 2 First sector (83888128-91947007, default 83888128): Using default value 83888128 Last sector, +sectors or +size{K,M,G} (83888128-91947007, default 91947007): +3G Partition 2 of type Linux and of size 3 GiB is set Command (m for help): p Disk /dev/sdb: 47.1 GB, 47076868096 bytes, 91947008 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x61c4807a Device Boot Start End Blocks Id System /dev/sdb1 2048 83888127 41943040 83 Linux /dev/sdb2 83888128 90179583 3145728 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oracle12c1 ~]#
创建为ORACLE ASMLIB卷:
[root@oracle12c1 oracle_asm]# ls -ltr /dev/oracleasm/disks/ total 0 [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# oracleasm listdisks [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# oracleasm createdisk OCRMGMT /dev/sdb1 Device "/dev/sdb1" is already labeled for ASM disk "OCRMGMT" [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# oracleasm listdisks [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# dd if=/dev/zero of=/dev/sdb1 bs=1M count=512 512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 5.49687 s, 97.7 MB/s [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# oracleasm listdisks [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# oracleasm createdisk OCRMGMT /dev/sdb1 Writing disk header: done Instantiating disk: done [root@oracle12c1 oracle_asm]# [root@oracle12c1 oracle_asm]# oracleasm listdisks OCRMGMT [root@oracle12c1 oracle_asm]# ls -ltr /dev/oracleasm/disks/ total 0 brw-rw---- 1 grid oinstall 8, 17 Mar 30 00:08 OCRMGMT [root@oracle12c1 oracle_asm]# —————————— [root@oracle12c1 ~]# oracleasm createdisk OCR /dev/sdb2 Writing disk header: done Instantiating disk: done [root@oracle12c1 ~]# [root@oracle12c1 ~]# ls -ltr /dev/oracleasm/disks/ total 0 brw-rw---- 1 grid oinstall 8, 17 Mar 30 00:08 OCRMGMT brw-rw---- 1 grid oinstall 8, 18 Mar 30 09:57 OCR [root@oracle12c1 ~]#
配置SSH等价关系:
[root@oracle12c1 oracle_asm]# su - grid Last login: Wed Mar 29 23:48:34 CST 2017 on pts/0 [grid@oracle12c1 ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/grid/.ssh/id_rsa): Created directory '/home/grid/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/grid/.ssh/id_rsa. Your public key has been saved in /home/grid/.ssh/id_rsa.pub. The key fingerprint is: 34:b5:17:83:84:df:60:5a:8d:13:bc:5e:0f:16:78:54 grid@oracle12c1 The key's randomart image is: +--[ RSA 2048]----+ | ++B+.E | | ..X.+o | | o=.*.. | | ...o.= | | S. o o | | . . | | | | | | | +-----------------+ [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c1 The authenticity of host 'oracle12c1 (10.158.1.46)' can't be established. ECDSA key fingerprint is c5:a7:91:47:34:f7:b5:fa:74:88:0d:6c:57:b6:03:33. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys grid@oracle12c1's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'oracle12c1'" and check to make sure that only the key(s) you wanted were added. [grid@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c1-priv The authenticity of host 'oracle12c1-priv (192.168.25.11)' can't be established. ECDSA key fingerprint is c5:a7:91:47:34:f7:b5:fa:74:88:0d:6c:57:b6:03:33. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. [grid@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c1-flex The authenticity of host 'oracle12c1-flex (192.168.26.11)' can't be established. ECDSA key fingerprint is c5:a7:91:47:34:f7:b5:fa:74:88:0d:6c:57:b6:03:33. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. [grid@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c2 The authenticity of host 'oracle12c2 (10.158.1.157)' can't be established. ECDSA key fingerprint is 55:0f:ff:ba:d1:5d:e4:99:ef:b0:04:3d:49:10:1a:15. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys grid@oracle12c2's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'oracle12c2'" and check to make sure that only the key(s) you wanted were added. [grid@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c2-priv The authenticity of host 'oracle12c2-priv (192.168.25.12)' can't be established. ECDSA key fingerprint is 55:0f:ff:ba:d1:5d:e4:99:ef:b0:04:3d:49:10:1a:15. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. [grid@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c2-flex The authenticity of host 'oracle12c2-flex (192.168.26.12)' can't be established. ECDSA key fingerprint is 55:0f:ff:ba:d1:5d:e4:99:ef:b0:04:3d:49:10:1a:15. Are you sure you want to continue connecting (yes/no)? oracle Please type 'yes' or 'no': yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ exit logout [root@oracle12c1 oracle_asm]# su - oracle Last login: Wed Mar 29 23:48:58 CST 2017 on pts/0 [oracle@oracle12c1 ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/oracle/.ssh/id_rsa): Created directory '/home/oracle/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/oracle/.ssh/id_rsa. Your public key has been saved in /home/oracle/.ssh/id_rsa.pub. The key fingerprint is: 58:5f:b1:de:50:9f:84:f0:cc:82:fc:68:85:fd:73:88 oracle@oracle12c1 The key's randomart image is: +--[ RSA 2048]----+ | .o o. | | . + +=...| | .+ +++ ..| | o .+o+o. | | . So.E.+.. | | . o | | | | | | | +-----------------+ [oracle@oracle12c1 ~]$ [oracle@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c1 The authenticity of host 'oracle12c1 (10.158.1.46)' can't be established. ECDSA key fingerprint is c5:a7:91:47:34:f7:b5:fa:74:88:0d:6c:57:b6:03:33. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys oracle@oracle12c1's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'oracle12c1'" and check to make sure that only the key(s) you wanted were added. [oracle@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c1-priv The authenticity of host 'oracle12c1-priv (192.168.25.11)' can't be established. ECDSA key fingerprint is c5:a7:91:47:34:f7:b5:fa:74:88:0d:6c:57:b6:03:33. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. [oracle@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c1-flex The authenticity of host 'oracle12c1-flex (192.168.26.11)' can't be established. ECDSA key fingerprint is c5:a7:91:47:34:f7:b5:fa:74:88:0d:6c:57:b6:03:33. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. [oracle@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c2 The authenticity of host 'oracle12c2 (10.158.1.157)' can't be established. ECDSA key fingerprint is 55:0f:ff:ba:d1:5d:e4:99:ef:b0:04:3d:49:10:1a:15. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys oracle@oracle12c2's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'oracle12c2'" and check to make sure that only the key(s) you wanted were added. [oracle@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c2-priv The authenticity of host 'oracle12c2-priv (192.168.25.12)' can't be established. ECDSA key fingerprint is 55:0f:ff:ba:d1:5d:e4:99:ef:b0:04:3d:49:10:1a:15. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. [oracle@oracle12c1 ~]$ ssh-copy-id -i .ssh/id_rsa.pub oracle12c2-flex The authenticity of host 'oracle12c2-flex (192.168.26.12)' can't be established. ECDSA key fingerprint is 55:0f:ff:ba:d1:5d:e4:99:ef:b0:04:3d:49:10:1a:15. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. [oracle@oracle12c1 ~]$ exit logout [root@oracle12c1 oracle_asm]#
至此,前期的配置就完成了,接下来是安装GRID和Oracle Database。
二、Grid Infrastracture
将安装介质上传服务器:
[root@oracle12c1 ~]# cd /software [root@oracle12c1 software]# ls oracle_asm rac [root@oracle12c1 software]# cd rac/ [root@oracle12c1 rac]# ls -ltr total 6297252 -rw-r--r-- 1 root root 2994687209 Mar 30 09:05 linuxx64_12201_grid_home.zip -rw-r--r-- 1 root root 3453696911 Mar 30 09:06 linuxx64_12201_database.zip [root@oracle12c1 rac]# [root@oracle12c1 rac]# du -sh * 3.3G linuxx64_12201_database.zip 2.8G linuxx64_12201_grid_home.zip [root@oracle12c1 rac]# [root@oracle12c1 rac]# ls -ltr total 6297252 -rw-r--r-- 1 root root 2994687209 Mar 30 09:05 linuxx64_12201_grid_home.zip -rw-r--r-- 1 root root 3453696911 Mar 30 09:06 linuxx64_12201_database.zip [root@oracle12c1 rac]# [root@oracle12c1 rac]# chmod -R 777 /software/ [root@oracle12c1 rac]# [root@oracle12c1 rac]# ls -ltr total 6297252 -rwxrwxrwx 1 root root 2994687209 Mar 30 09:05 linuxx64_12201_grid_home.zip -rwxrwxrwx 1 root root 3453696911 Mar 30 09:06 linuxx64_12201_database.zip [root@oracle12c1 rac]#
在当前的这个版本【Oracle 12c R2】中,Grid的安装包其实就是Grid的家目录,所以,这里解压安装包的时候,和之前会有所区别:你需要直接将安装包解压到GRID的ORACLE_HOME里面:
【解压】
[root@oracle12c1 rac]# su - grid Last login: Thu Mar 30 00:11:17 CST 2017 on pts/0 [grid@oracle12c1 ~]$ cd /software/rac/ [grid@oracle12c1 rac]$ ls linuxx64_12201_database.zip linuxx64_12201_grid_home.zip [grid@oracle12c1 rac]$ [grid@oracle12c1 rac]$ env | grep ORACLE_HOME ORACLE_HOME=/u01/app/12/grid [grid@oracle12c1 rac]$ [grid@oracle12c1 rac]$ env | grep ORACLE_BASE ORACLE_BASE=/u01/app/grid [grid@oracle12c1 rac]$ [grid@oracle12c1 rac]$ ls -ltr $ORACLE_HOME total 0 [grid@oracle12c1 rac]$ [grid@oracle12c1 rac]$ du -sh $ORACLE_HOME 0 /u01/app/12/grid [grid@oracle12c1 rac]$ [grid@oracle12c1 rac]$ unzip linuxx64_12201_grid_home.zip -d $ORACLE_HOME Archive: linuxx64_12201_grid_home.zip creating: /u01/app/12/grid/addnode/ inflating: /u01/app/12/grid/addnode/addnode_oraparam.ini.sbs inflating: /u01/app/12/grid/addnode/addnode.pl inflating: /u01/app/12/grid/addnode/addnode.sh inflating: /u01/app/12/grid/addnode/addnode_oraparam.ini creating: /u01/app/12/grid/assistants/ creating: /u01/app/12/grid/assistants/jlib/ inflating: /u01/app/12/grid/assistants/jlib/initconfig inflating: /u01/app/12/grid/assistants/jlib/appfwk.jar inflating: /u01/app/12/grid/assistants/jlib/rconfig.jar inflating: /u01/app/12/grid/assistants/jlib/assistantsCommon.jar inflating: /u01/app/12/grid/assistants/jlib/asstcommonext.jar inflating: /u01/app/12/grid/assistants/jlib/roohctl.jar creating: /u01/app/12/grid/assistants/netca/ inflating: /u01/app/12/grid/assistants/netca/netca.sbs creating: /u01/app/12/grid/assistants/netca/images/ inflating: /u01/app/12/grid/assistants/netca/images/netcaNSN.gif inflating: /u01/app/12/grid/assistants/netca/images/netcaDirDone.gif inflating: /u01/app/12/grid/assistants/netca/images/netcaDir.gif inflating: /u01/app/12/grid/assistants/netca/images/netcaNamDone.gif inflating: /u01/app/12/grid/assistants/netca/images/netcaLsnrDone.gif inflating: /u01/app/12/grid/assistants/netca/images/netcaIntro.gif inflating: /u01/app/12/grid/assistants/netca/images/netcaNSNDone.gif inflating: /u01/app/12/grid/assistants/netca/images/netcaLsnr.gif inflating: /u01/app/12/grid/assistants/netca/images/netcaNam.gif inflating: /u01/app/12/grid/assistants/netca/netca_deinst.sbs creating: /u01/app/12/grid/assistants/netca/jlib/ inflating: /u01/app/12/grid/assistants/netca/jlib/netca.jar inflating: /u01/app/12/grid/assistants/netca/netca.rsp (过多的输出,...) inflating: /u01/app/12/grid/xdk/mesg/lpxsk.msb inflating: /u01/app/12/grid/xdk/mesg/jznel.msb inflating: /u01/app/12/grid/xdk/mesg/lsxhu.msb inflating: /u01/app/12/grid/xdk/mesg/jznzhs.msb inflating: /u01/app/12/grid/xdk/mesg/lsxzht.msb inflating: /u01/app/12/grid/xdk/mesg/jznru.msb inflating: /u01/app/12/grid/xdk/mesg/lsxdk.msb inflating: /u01/app/12/grid/xdk/mesg/lsxru.msb inflating: /u01/app/12/grid/xdk/mesg/lsxsk.msb inflating: /u01/app/12/grid/xdk/mesg/jznhu.msb inflating: /u01/app/12/grid/xdk/mesg/lsxus.msb inflating: /u01/app/12/grid/xdk/mesg/lsxtr.msb inflating: /u01/app/12/grid/xdk/mesg/lpxel.msb inflating: /u01/app/12/grid/xdk/mesg/jznpt.msb inflating: /u01/app/12/grid/xdk/mesg/lsxja.msb finishing deferred symbolic links: /u01/app/12/grid/bin/lbuilder -> ../nls/lbuilder/lbuilder /u01/app/12/grid/javavm/admin/libjtcjt.so -> ../../javavm/jdk/jdk8/admin/libjtcjt.so /u01/app/12/grid/javavm/admin/lfclasses.bin -> ../../javavm/jdk/jdk8/admin/lfclasses.bin /u01/app/12/grid/javavm/admin/classes.bin -> ../../javavm/jdk/jdk8/admin/classes.bin /u01/app/12/grid/javavm/admin/cbp.jar -> ../../javavm/jdk/jdk8/admin/cbp.jar /u01/app/12/grid/javavm/lib/sunjce_provider.jar -> ../../javavm/jdk/jdk8/lib/sunjce_provider.jar /u01/app/12/grid/javavm/lib/jce.jar -> ../../javavm/jdk/jdk8/lib/jce.jar /u01/app/12/grid/javavm/lib/security/US_export_policy.jar -> ../../../javavm/jdk/jdk8/lib/security/US_export_policy.jar /u01/app/12/grid/javavm/lib/security/java.security -> ../../../javavm/jdk/jdk8/lib/security/java.security /u01/app/12/grid/javavm/lib/security/local_policy.jar -> ../../../javavm/jdk/jdk8/lib/security/local_policy.jar /u01/app/12/grid/javavm/lib/security/cacerts -> ../../../javavm/jdk/jdk8/lib/security/cacerts /u01/app/12/grid/jdk/bin/ControlPanel -> jcontrol /u01/app/12/grid/jdk/jre/bin/ControlPanel -> jcontrol /u01/app/12/grid/jdk/jre/lib/amd64/server/libjsig.so -> ../libjsig.so /u01/app/12/grid/lib/libclntshcore.so -> libclntshcore.so.12.1 /u01/app/12/grid/lib/libjavavm12.a -> ../javavm/jdk/jdk8/lib/libjavavm12.a /u01/app/12/grid/lib/libodm12.so -> libodmd12.so /u01/app/12/grid/lib/libagtsh.so -> libagtsh.so.1.0 /u01/app/12/grid/lib/libclntsh.so -> libclntsh.so.12.1 /u01/app/12/grid/lib/libocci.so -> libocci.so.12.1 [grid@oracle12c1 rac]$
进入解压目录:
[grid@oracle12c1 rac]$ du -sh $ORACLE_HOME 7.0G /u01/app/12/grid [grid@oracle12c1 rac]$ cd $ORACLE_HOME [grid@oracle12c1 grid]$ ls addnode cha cv deinstall env.ora has inventory jlib md opmn ords perl qos rhp scheduler srvm usm wwg assistants clone dbjava demo evm hs javavm ldap network oracore oss plsql racg root.sh slax suptools utl xag bin crs dbs diagnostics gpnp install jdbc lib nls ord oui precomp rdbms rootupgrade.sh sqlpatch tomcat welcome.html xdk cdata css dc_ocm dmu gridSetup.sh instantclient jdk log OPatch ordim owm QOpatch relnotes runcluvfy.sh sqlplus ucp wlm [grid@oracle12c1 grid]$
安装CVUQDisk:
[grid@oracle12c1 grid]$ pwd /u01/app/12/grid [grid@oracle12c1 grid]$ [grid@oracle12c1 grid]$ cd cv [grid@oracle12c1 cv]$ ls admin cvdata cvutl remenv rpm [grid@oracle12c1 cv]$ cd rpm/ [grid@oracle12c1 rpm]$ ls cvuqdisk-1.0.10-1.rpm [grid@oracle12c1 rpm]$ [grid@oracle12c1 rpm]$ pwd /u01/app/12/grid/cv/rpm [grid@oracle12c1 rpm]$ [grid@oracle12c1 rpm]$ exit logout [root@oracle12c1 rac]# cd /u01/app/12/grid/cv/rpm/ [root@oracle12c1 rpm]# ls cvuqdisk-1.0.10-1.rpm [root@oracle12c1 rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpm Preparing... ################################# [100%] Using default group oinstall to install package Updating / installing... 1:cvuqdisk-1.0.10-1 ################################# [100%] [root@oracle12c1 rpm]#
以grid用户开OUI,准备图形化安装:
[root@oracle12c1 rpm]# su - grid Last login: Thu Mar 30 09:14:36 CST 2017 on pts/0 [grid@oracle12c1 ~]$ cd $ORACLE_HOME [grid@oracle12c1 grid]$ ls -ltr | grep Setup -rwxr-x--- 1 grid oinstall 5395 Jul 21 2016 gridSetup.sh [grid@oracle12c1 grid]$
在新版的安装里面OUI的启动不再是:runInstaller了,而是gridSetup.sh。
开始前,检查网络与SSH等价关系:
[grid@oracle12c1 grid]$ ./runcluvfy.sh comp nodecon -n oracle12c1,oracle12c2 -verbose Verifying Node Connectivity ... Verifying Hosts File ... Node Name Status ------------------------------------ ------------------------ oracle12c1 passed oracle12c2 passed Verifying Hosts File ...PASSED Interface information for node "oracle12c2" Name IP Address Subnet Gateway Def. Gateway HW Address MTU ------ --------------- --------------- --------------- --------------- ----------------- ------ ens32 10.158.1.157 10.158.1.0 0.0.0.0 10.158.0.1 00:50:56:84:31:E2 1500 ens33 192.168.25.12 192.168.25.0 0.0.0.0 10.158.0.1 00:50:56:84:3F:C8 1500 ens34 192.168.26.12 192.168.26.0 0.0.0.0 10.158.0.1 00:50:56:84:36:D4 1500 Interface information for node "oracle12c1" Name IP Address Subnet Gateway Def. Gateway HW Address MTU ------ --------------- --------------- --------------- --------------- ----------------- ------ ens32 10.158.1.46 10.158.1.0 0.0.0.0 10.158.0.1 00:50:56:84:32:DF 1500 ens33 192.168.25.11 192.168.25.0 0.0.0.0 10.158.0.1 00:50:56:84:2F:5B 1500 ens34 192.168.26.11 192.168.26.0 0.0.0.0 10.158.0.1 00:50:56:84:2B:98 1500 Check: MTU consistency of the subnet "10.158.1.0". Node Name IP Address Subnet MTU ---------------- ------------ ------------ ------------ ---------------- oracle12c2 ens32 10.158.1.157 10.158.1.0 1500 oracle12c1 ens32 10.158.1.46 10.158.1.0 1500 Check: MTU consistency of the subnet "192.168.26.0". Node Name IP Address Subnet MTU ---------------- ------------ ------------ ------------ ---------------- oracle12c2 ens34 192.168.26.12 192.168.26.0 1500 oracle12c1 ens34 192.168.26.11 192.168.26.0 1500 Check: MTU consistency of the subnet "192.168.25.0". Node Name IP Address Subnet MTU ---------------- ------------ ------------ ------------ ---------------- oracle12c2 ens33 192.168.25.12 192.168.25.0 1500 oracle12c1 ens33 192.168.25.11 192.168.25.0 1500 Verifying Check that maximum (MTU) size packet goes through subnet ...PASSED Source Destination Connected? ------------------------------ ------------------------------ ---------------- oracle12c1[ens32:10.158.1.46] oracle12c2[ens32:10.158.1.157] yes Source Destination Connected? ------------------------------ ------------------------------ ---------------- oracle12c1[ens34:192.168.26.11] oracle12c2[ens34:192.168.26.12] yes Source Destination Connected? ------------------------------ ------------------------------ ---------------- oracle12c1[ens33:192.168.25.11] oracle12c2[ens33:192.168.25.12] yes Verifying subnet mask consistency for subnet "10.158.1.0" ...PASSED Verifying subnet mask consistency for subnet "192.168.26.0" ...PASSED Verifying subnet mask consistency for subnet "192.168.25.0" ...PASSED Verifying Node Connectivity ...PASSED Verifying Multicast check ... Checking subnet "10.158.1.0" for multicast communication with multicast group "224.0.0.251" Verifying Multicast check ...PASSED Verification of node connectivity was successful. CVU operation performed: node connectivity Date: Mar 30, 2017 9:44:43 AM CVU home: /u01/app/12/grid/ User: grid [grid@oracle12c1 grid]$
开始:
[root@oracle12c1 Desktop]# xhost + access control disabled, clients can connect from any host [root@oracle12c1 Desktop]# env | grep DISPLAY DISPLAY=:0 [root@oracle12c1 Desktop]# su - grid Last login: Thu Mar 30 09:32:35 CST 2017 on pts/0 [grid@oracle12c1 ~]$ export DISPLAY=:0 [grid@oracle12c1 ~]$ xhost + access control disabled, clients can connect from any host [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ cd $ORACLE_HOME [grid@oracle12c1 grid]$ ls addnode deinstall inventory opmn qos srvm assistants demo javavm oracore racg suptools bin diagnostics jdbc ord rdbms tomcat cdata dmu jdk ordim relnotes ucp cha env.ora jlib ords rhp usm clone evm ldap oss root.sh utl crs gpnp lib oui rootupgrade.sh welcome.html css gridSetup.sh log owm runcluvfy.sh wlm cv has md perl scheduler wwg dbjava hs network plsql slax xag dbs install nls precomp sqlpatch xdk dc_ocm instantclient OPatch QOpatch sqlplus [grid@oracle12c1 grid]$ [grid@oracle12c1 grid]$ ./gridSetup.sh Launching Oracle Grid Infrastructure Setup Wizard...
GUI:
可以看到空间不够,GIMR最少需要180G。
继续按照之前ISCSI的方法,重新配置一块存储:
[root@oracle12c1 ~]# iscsiadm -m discovery -t sendtargets -p openfiler 10.158.1.47:3260,1 rac12c_data 10.158.1.47:3260,1 oracle12crac [root@oracle12c1 ~]# [root@oracle12c1 ~]# iscsiadm -m node -T rac12c_data -p openfiler -l Logging in to [iface: default, target: rac12c_data, portal: 10.158.1.47,3260] (multiple) Login to [iface: default, target: rac12c_data, portal: 10.158.1.47,3260] successful. [root@oracle12c1 ~]# [root@oracle12c1 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 66G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 65.5G 0 part ├─ol-root 252:0 0 39.6G 0 lvm / ├─ol-swap 252:1 0 6.6G 0 lvm [SWAP] └─ol-home 252:2 0 19.3G 0 lvm /home sdb 8:16 0 43.9G 0 disk ├─sdb1 8:17 0 40G 0 part └─sdb2 8:18 0 3G 0 part sdc 8:32 0 286.1G 0 disk sr0 11:0 1 3.5G 0 rom /run/media/root/RHEL-7.3 Server.x86_64 [root@oracle12c1 ~]# [root@oracle12c1 ~]# fdisk /dev/sdc Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table Building a new DOS disklabel with disk identifier 0x8f525035. Command (m for help): p Disk /dev/sdc: 307.2 GB, 307190824960 bytes, 599982080 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x8f525035 Device Boot Start End Blocks Id System Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-599982079, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-599982079, default 599982079): +184G Partition 1 of type Linux and of size 184 GiB is set Command (m for help): p Disk /dev/sdc: 307.2 GB, 307190824960 bytes, 599982080 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x8f525035 Device Boot Start End Blocks Id System /dev/sdc1 2048 385878015 192937984 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@oracle12c1 ~]# [root@oracle12c1 ~]# oracleasm createdisk MGMT /dev/sdc1 Writing disk header: done Instantiating disk: done [root@oracle12c1 ~]# [root@oracle12c1 ~]# oracleasm listdisks MGMT OCR OCRMGMT [root@oracle12c1 ~]#
其他节点:oracleasm scandisks
然后,GUI中,通过【change discovery path】刷新列表:
删掉GRID的ORACLE_BASE中的文件:
[root@oracle12c1 ~]# su - grid Last login: Thu Mar 30 09:44:08 CST 2017 on pts/0 [grid@oracle12c1 ~]$ cd $ORACLE_BASE [grid@oracle12c1 grid]$ ls crsdata [grid@oracle12c1 grid]$ rm -rf * [grid@oracle12c1 grid]$ [grid@oracle12c1 grid]$ ls -ltr total 0 [grid@oracle12c1 grid]$
继续:
对于avahi-daemon的错误:
[root@oracle12c1 ~]# service avahi-daemon status Redirecting to /bin/systemctl status avahi-daemon.service avahi-daemon.service - Avahi mDNS/DNS-SD Stack Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled) Active: active (running) since Wed 2017-03-29 19:46:48 CST; 14h ago Main PID: 596 (avahi-daemon) Status: "Server startup complete. Host name is oracle12c1.local. Local service cookie is 3243454123." CGroup: /system.slice/avahi-daemon.service ├─596 avahi-daemon: running [oracle12c1.local] └─629 avahi-daemon: chroot helper Mar 29 19:54:39 oracle12c1 avahi-daemon[596]: Registering new address record for 10.158.1.46 on ens32.IPv4. Mar 29 19:54:40 oracle12c1 avahi-daemon[596]: Joining mDNS multicast group on interface ens33.IPv4 with address 192.168.25.11. Mar 29 19:54:40 oracle12c1 avahi-daemon[596]: New relevant interface ens33.IPv4 for mDNS. Mar 29 19:54:40 oracle12c1 avahi-daemon[596]: Registering new address record for 192.168.25.11 on ens33.IPv4. Mar 29 19:54:40 oracle12c1 avahi-daemon[596]: Joining mDNS multicast group on interface ens34.IPv4 with address 192.168.26.11. Mar 29 19:54:40 oracle12c1 avahi-daemon[596]: New relevant interface ens34.IPv4 for mDNS. Mar 29 19:54:40 oracle12c1 avahi-daemon[596]: Registering new address record for 192.168.26.11 on ens34.IPv4. Mar 29 19:54:41 oracle12c1 avahi-daemon[596]: Registering new address record for fe80::250:56ff:fe84:32df on ens32.*. Mar 29 19:54:41 oracle12c1 avahi-daemon[596]: Registering new address record for fe80::250:56ff:fe84:2f5b on ens33.*. Mar 29 19:54:42 oracle12c1 avahi-daemon[596]: Registering new address record for fe80::250:56ff:fe84:2b98 on ens34.*. [root@oracle12c1 ~]# [root@oracle12c1 ~]# service avahi-daemon stop Redirecting to /bin/systemctl stop avahi-daemon.service Warning: Stopping avahi-daemon.service, but it can still be activated by: avahi-daemon.socket [root@oracle12c1 ~]# [root@oracle12c1 ~]# service avahi-daemon status Redirecting to /bin/systemctl status avahi-daemon.service avahi-daemon.service - Avahi mDNS/DNS-SD Stack Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled) Active: inactive (dead) since Thu 2017-03-30 10:32:01 CST; 4s ago Main PID: 596 (code=exited, status=0/SUCCESS) Status: "avahi-daemon 0.6.31 exiting." Mar 29 19:54:41 oracle12c1 avahi-daemon[596]: Registering new address record for fe80::250:56ff:fe84:32df on ens32.*. Mar 29 19:54:41 oracle12c1 avahi-daemon[596]: Registering new address record for fe80::250:56ff:fe84:2f5b on ens33.*. Mar 29 19:54:42 oracle12c1 avahi-daemon[596]: Registering new address record for fe80::250:56ff:fe84:2b98 on ens34.*. Mar 30 10:32:01 oracle12c1 systemd[1]: Stopping Avahi mDNS/DNS-SD Stack... Mar 30 10:32:01 oracle12c1 avahi-daemon[596]: Got SIGTERM, quitting. Mar 30 10:32:01 oracle12c1 avahi-daemon[596]: Leaving mDNS multicast group on interface ens34.IPv4 with address 192.168.26.11. Mar 30 10:32:01 oracle12c1 avahi-daemon[596]: Leaving mDNS multicast group on interface ens33.IPv4 with address 192.168.25.11. Mar 30 10:32:01 oracle12c1 avahi-daemon[596]: Leaving mDNS multicast group on interface ens32.IPv4 with address 10.158.1.46. Mar 30 10:32:01 oracle12c1 avahi-daemon[596]: avahi-daemon 0.6.31 exiting. Mar 30 10:32:01 oracle12c1 systemd[1]: Stopped Avahi mDNS/DNS-SD Stack. [root@oracle12c1 ~]#
对于SWAP的错误:
[root@oracle12c1 ~]# mkdir /swapon_data [root@oracle12c1 ~]# cd /swapon_data/ [root@oracle12c1 swapon_data]# ls [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# dd if=/dev/zero of=swapon_data_2G_01 bs=1M count=2048 2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 62.4255 s, 34.4 MB/s [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# ls -ltr total 2097152 -rw-r--r-- 1 root root 2147483648 Mar 30 10:38 swapon_data_2G_01 [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# du -sh swapon_data_2G_01 2.0G swapon_data_2G_01 [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 6922236 0 -1 [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# chmod -R 0600 swapon_data_2G_01 [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# mkswap /swapon_data/swapon_data_2G_01 Setting up swapspace version 1, size = 2097148 KiB no label, UUID=2562cf27-3251-4fc9-ab12-c56ff75f0c11 [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# swapon /swapon_data/swapon_data_2G_01 [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 6922236 0 -1 /swapon_data/swapon_data_2G_01 file 2097148 0 -2 [root@oracle12c1 swapon_data]# [root@oracle12c1 swapon_data]# free -m total used free shared buff/cache available Mem: 7729 1215 428 53 6085 6371 Swap: 8807 0 8807 [root@oracle12c1 swapon_data]#
然后,继续:
等待安装:2017年3月30日10:46:51
在后面【Copy files to remote nodes】的阶段,会将当前节点的相关软件与文件,传递到远端的其他节点:
然后,就要执行脚本了:
顺序:
节点一: orainstRoot.sh
节点二:orainstRoot.sh
节点一:root.sh
节点二:root.sh
这里的耗时非常的长,执行过程中,后台的情况是这样的:
在每个机器上的脚本执行的情况如下:
节点一:
[root@oracle12c1 Desktop]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@oracle12c1 Desktop]# [root@oracle12c1 Desktop]# /u01/app/12/grid/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/12/grid Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... 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. Relinking oracle with rac_on option Using configuration parameter file: /u01/app/12/grid/crs/install/crsconfig_params The log of current session can be found at: /u01/app/grid/crsdata/oracle12c1/crsconfig/rootcrs_oracle12c1_2017-03-30_07-06-13PM.log 2017/03/30 19:07:28 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'. 2017/03/30 19:07:28 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector. 2017/03/30 19:09:04 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector. 2017/03/30 19:09:04 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'. 2017/03/30 19:09:11 CLSRSC-363: User ignored prerequisites during installation 2017/03/30 19:09:11 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'. 2017/03/30 19:09:15 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'. 2017/03/30 19:09:16 CLSRSC-594: Executing installation step 5 of 19: 'SaveParamFile'. 2017/03/30 19:09:27 CLSRSC-594: Executing installation step 6 of 19: 'SetupOSD'. 2017/03/30 19:09:28 CLSRSC-594: Executing installation step 7 of 19: 'CheckCRSConfig'. 2017/03/30 19:09:28 CLSRSC-594: Executing installation step 8 of 19: 'SetupLocalGPNP'. 2017/03/30 19:10:20 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'. 2017/03/30 19:10:41 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'. 2017/03/30 19:10:41 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'. 2017/03/30 19:10:49 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'. 2017/03/30 19:11:05 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service' 2017/03/30 19:12:07 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'. 2017/03/30 19:12:16 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'. CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle12c1' CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle12c1' has completed CRS-4133: Oracle High Availability Services has been stopped. CRS-4123: Oracle High Availability Services has been started. 2017/03/30 19:13:10 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'. 2017/03/30 19:13:19 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'. CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle12c1' CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle12c1' has completed CRS-4133: Oracle High Availability Services has been stopped. CRS-4123: Oracle High Availability Services has been started. CRS-2672: Attempting to start 'ora.evmd' on 'oracle12c1' CRS-2672: Attempting to start 'ora.mdnsd' on 'oracle12c1' CRS-2676: Start of 'ora.mdnsd' on 'oracle12c1' succeeded CRS-2676: Start of 'ora.evmd' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oracle12c1' CRS-2676: Start of 'ora.gpnpd' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oracle12c1' CRS-2672: Attempting to start 'ora.gipcd' on 'oracle12c1' CRS-2676: Start of 'ora.cssdmonitor' on 'oracle12c1' succeeded CRS-2676: Start of 'ora.gipcd' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oracle12c1' CRS-2672: Attempting to start 'ora.diskmon' on 'oracle12c1' CRS-2676: Start of 'ora.diskmon' on 'oracle12c1' succeeded CRS-2676: Start of 'ora.cssd' on 'oracle12c1' succeeded Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-170330PM071407.log for details. 2017/03/30 19:16:39 CLSRSC-482: Running command: '/u01/app/12/grid/bin/ocrconfig -upgrade grid oinstall' CRS-2672: Attempting to start 'ora.crf' on 'oracle12c1' CRS-2672: Attempting to start 'ora.storage' on 'oracle12c1' CRS-2676: Start of 'ora.storage' on 'oracle12c1' succeeded CRS-2676: Start of 'ora.crf' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'oracle12c1' CRS-2676: Start of 'ora.crsd' on 'oracle12c1' succeeded CRS-4256: Updating the profile Successful addition of voting disk 49be4fa3cdc34f74bf2ecafab4c3dc66. 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 49be4fa3cdc34f74bf2ecafab4c3dc66 (/dev/oracleasm/disks/OCR) [OCR] Located 1 voting disk(s). CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle12c1' CRS-2673: Attempting to stop 'ora.crsd' on 'oracle12c1' CRS-2677: Stop of 'ora.crsd' on 'oracle12c1' succeeded CRS-2673: Attempting to stop 'ora.storage' on 'oracle12c1' CRS-2673: Attempting to stop 'ora.crf' on 'oracle12c1' CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'oracle12c1' CRS-2673: Attempting to stop 'ora.gpnpd' on 'oracle12c1' CRS-2673: Attempting to stop 'ora.mdnsd' on 'oracle12c1' CRS-2677: Stop of 'ora.drivers.acfs' on 'oracle12c1' succeeded CRS-2677: Stop of 'ora.crf' on 'oracle12c1' succeeded CRS-2677: Stop of 'ora.gpnpd' on 'oracle12c1' succeeded CRS-2677: Stop of 'ora.storage' on 'oracle12c1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'oracle12c1' CRS-2677: Stop of 'ora.mdnsd' on 'oracle12c1' succeeded CRS-2677: Stop of 'ora.asm' on 'oracle12c1' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'oracle12c1' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'oracle12c1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'oracle12c1' CRS-2673: Attempting to stop 'ora.evmd' on 'oracle12c1' CRS-2677: Stop of 'ora.evmd' on 'oracle12c1' succeeded CRS-2677: Stop of 'ora.ctssd' on 'oracle12c1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'oracle12c1' CRS-2677: Stop of 'ora.cssd' on 'oracle12c1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'oracle12c1' CRS-2677: Stop of 'ora.gipcd' on 'oracle12c1' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle12c1' has completed CRS-4133: Oracle High Availability Services has been stopped. 2017/03/30 19:18:39 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'. CRS-4123: Starting Oracle High Availability Services-managed resources CRS-2672: Attempting to start 'ora.evmd' on 'oracle12c1' CRS-2672: Attempting to start 'ora.mdnsd' on 'oracle12c1' CRS-2676: Start of 'ora.mdnsd' on 'oracle12c1' succeeded CRS-2676: Start of 'ora.evmd' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oracle12c1' CRS-2676: Start of 'ora.gpnpd' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'oracle12c1' CRS-2676: Start of 'ora.gipcd' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oracle12c1' CRS-2676: Start of 'ora.cssdmonitor' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oracle12c1' CRS-2672: Attempting to start 'ora.diskmon' on 'oracle12c1' CRS-2676: Start of 'ora.diskmon' on 'oracle12c1' succeeded CRS-2676: Start of 'ora.cssd' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'oracle12c1' CRS-2672: Attempting to start 'ora.ctssd' on 'oracle12c1' CRS-2676: Start of 'ora.ctssd' on 'oracle12c1' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oracle12c1' CRS-2676: Start of 'ora.asm' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.storage' on 'oracle12c1' CRS-2676: Start of 'ora.storage' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.crf' on 'oracle12c1' CRS-2676: Start of 'ora.crf' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'oracle12c1' CRS-2676: Start of 'ora.crsd' on 'oracle12c1' succeeded CRS-6023: Starting Oracle Cluster Ready Services-managed resources CRS-6017: Processing resource auto-start for servers: oracle12c1 CRS-6016: Resource auto-start has completed for server oracle12c1 CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources CRS-4123: Oracle High Availability Services has been started. 2017/03/30 19:21:00 CLSRSC-343: Successfully started Oracle Clusterware stack 2017/03/30 19:21:00 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'. CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'oracle12c1' CRS-2672: Attempting to start 'ora.ASMNET2LSNR_ASM.lsnr' on 'oracle12c1' CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'oracle12c1' succeeded CRS-2676: Start of 'ora.ASMNET2LSNR_ASM.lsnr' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oracle12c1' CRS-2676: Start of 'ora.asm' on 'oracle12c1' succeeded CRS-2672: Attempting to start 'ora.OCR.dg' on 'oracle12c1' CRS-2676: Start of 'ora.OCR.dg' on 'oracle12c1' succeeded 2017/03/30 20:16:10 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'. 2017/03/30 20:30:08 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded [root@oracle12c1 Desktop]#
可以看到,最新版的安装里面,root.sh的变化很大。
执行的过程中还会单独抛出日志:
/u01/app/grid/crsdata/oracle12c1/crsconfig/rootcrs_oracle12c1_2017-03-30_07-06-13PM.log
节点一跑完了root.sh之后,就可以看到集群状态了:
[root@oracle12c1 ~]# su - grid Last login: Thu Mar 30 20:41:19 CST 2017 [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.GIMR.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....AF.lsnr ora....er.type 0/5 0/ OFFLINE OFFLINE ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.MGMTLSNR ora....nr.type 0/0 0/0 OFFLINE OFFLINE ora.OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.asm ora.asm.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora....network ora....rk.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE oracle12c1 ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE oracle12c1 ora....2c1.ons application 0/3 0/0 ONLINE ONLINE oracle12c1 ora....2c1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE oracle12c1 ora.proxy_advm ora....vm.type 0/5 0/ OFFLINE OFFLINE ora.qosmserver ora....er.type 0/1 0/2 ONLINE ONLINE oracle12c1 ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE oracle12c1 [grid@oracle12c1 ~]$
接下来是跑节点二的root.sh,又要非常长的时间:
[root@oracle12c2 Desktop]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@oracle12c2 Desktop]# [root@oracle12c2 Desktop]# /u01/app/12/grid/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/12/grid Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... 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. Relinking oracle with rac_on option Using configuration parameter file: /u01/app/12/grid/crs/install/crsconfig_params The log of current session can be found at: /u01/app/grid/crsdata/oracle12c2/crsconfig/rootcrs_oracle12c2_2017-03-30_08-42-34PM.log 2017/03/30 20:43:35 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'. 2017/03/30 20:43:35 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector. 2017/03/30 20:44:19 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector. 2017/03/30 20:44:19 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'. 2017/03/30 20:44:21 CLSRSC-363: User ignored prerequisites during installation 2017/03/30 20:44:21 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'. 2017/03/30 20:44:24 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'. 2017/03/30 20:44:24 CLSRSC-594: Executing installation step 5 of 19: 'SaveParamFile'. 2017/03/30 20:44:29 CLSRSC-594: Executing installation step 6 of 19: 'SetupOSD'. 2017/03/30 20:44:29 CLSRSC-594: Executing installation step 7 of 19: 'CheckCRSConfig'. 2017/03/30 20:44:29 CLSRSC-594: Executing installation step 8 of 19: 'SetupLocalGPNP'. 2017/03/30 20:44:33 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'. 2017/03/30 20:44:43 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'. 2017/03/30 20:44:44 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'. 2017/03/30 20:44:46 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'. 2017/03/30 20:45:02 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service' 2017/03/30 20:46:05 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'. 2017/03/30 20:46:08 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'. CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle12c2' CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle12c2' has completed CRS-4133: Oracle High Availability Services has been stopped. CRS-4123: Oracle High Availability Services has been started. 2017/03/30 20:46:53 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'. 2017/03/30 20:46:55 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'. CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle12c2' CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle12c2' has completed CRS-4133: Oracle High Availability Services has been stopped. CRS-4123: Oracle High Availability Services has been started. CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle12c2' CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'oracle12c2' CRS-2677: Stop of 'ora.drivers.acfs' on 'oracle12c2' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle12c2' has completed CRS-4133: Oracle High Availability Services has been stopped. 2017/03/30 20:47:45 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'. CRS-4123: Starting Oracle High Availability Services-managed resources CRS-2672: Attempting to start 'ora.mdnsd' on 'oracle12c2' CRS-2672: Attempting to start 'ora.evmd' on 'oracle12c2' CRS-2676: Start of 'ora.mdnsd' on 'oracle12c2' succeeded CRS-2676: Start of 'ora.evmd' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oracle12c2' CRS-2676: Start of 'ora.gpnpd' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'oracle12c2' CRS-2676: Start of 'ora.gipcd' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oracle12c2' CRS-2676: Start of 'ora.cssdmonitor' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oracle12c2' CRS-2672: Attempting to start 'ora.diskmon' on 'oracle12c2' CRS-2676: Start of 'ora.diskmon' on 'oracle12c2' succeeded CRS-2676: Start of 'ora.cssd' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'oracle12c2' CRS-2672: Attempting to start 'ora.ctssd' on 'oracle12c2' CRS-2676: Start of 'ora.ctssd' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.crf' on 'oracle12c2' CRS-2676: Start of 'ora.crf' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'oracle12c2' CRS-2676: Start of 'ora.crsd' on 'oracle12c2' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oracle12c2' CRS-2676: Start of 'ora.asm' on 'oracle12c2' succeeded CRS-6017: Processing resource auto-start for servers: oracle12c2 CRS-2672: Attempting to start 'ora.net1.network' on 'oracle12c2' CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'oracle12c2' CRS-2672: Attempting to start 'ora.ASMNET2LSNR_ASM.lsnr' on 'oracle12c2' CRS-2676: Start of 'ora.net1.network' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.ons' on 'oracle12c2' CRS-2676: Start of 'ora.ons' on 'oracle12c2' succeeded CRS-2676: Start of 'ora.ASMNET2LSNR_ASM.lsnr' on 'oracle12c2' succeeded CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'oracle12c2' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oracle12c2' CRS-2676: Start of 'ora.asm' on 'oracle12c2' succeeded CRS-6016: Resource auto-start has completed for server oracle12c2 CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources CRS-4123: Oracle High Availability Services has been started. 2017/03/30 20:53:54 CLSRSC-343: Successfully started Oracle Clusterware stack 2017/03/30 20:53:54 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'. 2017/03/30 20:54:35 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'. 2017/03/30 20:55:00 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded [root@oracle12c2 Desktop]#
可以看到,脚本执行成功。
查看下节点二的GRID资源情况:
[root@oracle12c2 ~]# su - grid Last login: Thu Mar 30 21:32:29 CST 2017 [grid@oracle12c2 ~]$ crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.GIMR.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....AF.lsnr ora....er.type 0/5 0/ OFFLINE OFFLINE ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.MGMTLSNR ora....nr.type 0/0 0/0 OFFLINE OFFLINE ora.OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.asm ora.asm.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora....network ora....rk.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE oracle12c1 ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE oracle12c1 ora....2c1.ons application 0/3 0/0 ONLINE ONLINE oracle12c1 ora....2c1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE oracle12c1 ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE oracle12c2 ora....2c2.ons application 0/3 0/0 ONLINE ONLINE oracle12c2 ora....2c2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE oracle12c2 ora.proxy_advm ora....vm.type 0/5 0/ OFFLINE OFFLINE ora.qosmserver ora....er.type 0/1 0/2 ONLINE ONLINE oracle12c1 ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE oracle12c1 [grid@oracle12c2 ~]$
然后,OUI可以继续了:
这个过程也要等待相当长的一段时间。
这样,GRID就安装结束了。
看看这个时候的GRID状态:
[root@oracle12c1 ~]# su - grid Last login: Thu Mar 30 23:39:43 CST 2017 [grid@oracle12c1 ~]$ crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.GIMR.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....AF.lsnr ora....er.type 0/5 0/ OFFLINE OFFLINE ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.MGMTLSNR ora....nr.type 0/0 0/0 ONLINE ONLINE oracle12c1 ora.OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.asm ora.asm.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.chad ora.chad.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.mgmtdb ora....db.type 0/2 0/1 ONLINE ONLINE oracle12c1 ora....network ora....rk.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE oracle12c1 ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE oracle12c1 ora....2c1.ons application 0/3 0/0 ONLINE ONLINE oracle12c1 ora....2c1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE oracle12c1 ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE oracle12c2 ora....2c2.ons application 0/3 0/0 ONLINE ONLINE oracle12c2 ora....2c2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE oracle12c2 ora.proxy_advm ora....vm.type 0/5 0/ OFFLINE OFFLINE ora.qosmserver ora....er.type 0/1 0/2 ONLINE ONLINE oracle12c1 ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE oracle12c1 [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ crs_stat -l NAME=ora.ASMNET1LSNR_ASM.lsnr TYPE=ora.asm_listener.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.ASMNET2LSNR_ASM.lsnr TYPE=ora.asm_listener.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.GIMR.dg TYPE=ora.diskgroup.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.LISTENER.lsnr TYPE=ora.listener.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.LISTENER_LEAF.lsnr TYPE=ora.leaf_listener.type TARGET=OFFLINE STATE=OFFLINE NAME=ora.LISTENER_SCAN1.lsnr TYPE=ora.scan_listener.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.MGMTLSNR TYPE=ora.mgmtlsnr.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.OCR.dg TYPE=ora.diskgroup.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.asm TYPE=ora.asm.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.chad TYPE=ora.chad.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.cvu TYPE=ora.cvu.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.mgmtdb TYPE=ora.mgmtdb.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.net1.network TYPE=ora.network.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.ons TYPE=ora.ons.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.LISTENER_ORACLE12C1.lsnr TYPE=application TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.ons TYPE=application TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.vip TYPE=ora.cluster_vip_net1.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c2.LISTENER_ORACLE12C2.lsnr TYPE=application TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.oracle12c2.ons TYPE=application TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.oracle12c2.vip TYPE=ora.cluster_vip_net1.type TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.proxy_advm TYPE=ora.proxy_advm.type TARGET=OFFLINE STATE=OFFLINE NAME=ora.qosmserver TYPE=ora.qosmserver.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.scan1.vip TYPE=ora.scan_vip.type TARGET=ONLINE STATE=ONLINE on oracle12c1 [grid@oracle12c1 ~]$
三、Oracle database
接下来,安装Oracle Database。
继续下一步前,创建存放ORACLE数据的磁盘组:
[root@oracle12c1 Desktop]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 66G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 65.5G 0 part ├─ol-root 252:0 0 39.6G 0 lvm / ├─ol-swap 252:1 0 6.6G 0 lvm [SWAP] └─ol-home 252:2 0 19.3G 0 lvm /home sdb 8:16 0 286.1G 0 disk ├─sdb1 8:17 0 183G 0 part └─sdb2 8:18 0 103.1G 0 part sdc 8:32 0 43.9G 0 disk ├─sdc1 8:33 0 4G 0 part └─sdc2 8:34 0 39G 0 part sr0 11:0 1 3.5G 0 rom /run/media/root/RHEL-7.3 Server.x86_64 [root@oracle12c1 Desktop]# oracleasm createdisk DATA01 /dev/sdb2 Writing disk header: done Instantiating disk: done [root@oracle12c1 Desktop]#
ASMCA:
命令行中查看一下:
[root@oracle12c1 ~]# su - grid Last login: Fri Mar 31 00:47:39 CST 2017 on pts/0 [grid@oracle12c1 ~]$ asmcmd ASMCMD> lsdg State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 512 4096 4194304 292956 292812 0 292812 0 N DATA01/ MOUNTED EXTERN N 512 512 4096 4194304 39936 6108 0 6108 0 N GIMR/ MOUNTED EXTERN N 512 512 4096 4194304 4096 3760 0 3760 0 Y OCR/ ASMCMD> exit [grid@oracle12c1 ~]$
配置DISPLAY
[root@oracle12c1 Desktop]# su - oracle Last login: Thu Mar 30 17:42:14 CST 2017 on pts/0 [oracle@oracle12c1 ~]$ export DISPLAY=:0 [oracle@oracle12c1 ~]$ xhost + access control disabled, clients can connect from any host [oracle@oracle12c1 ~]$ [oracle@oracle12c1 ~]$
解压安装介质:
[oracle@oracle12c1 ~]$ cd /software [oracle@oracle12c1 software]$ ls linuxx64_12201_database.zip oracleasmlib-2.0.12-1.el7.x86_64.rpm linuxx64_12201_grid_home.zip oracleasm-support-2.1.8-3.el7.x86_64.rpm nomachine_5.2.11_1_x86_64.rpm [oracle@oracle12c1 software]$ unzip linuxx64_12201_database.zip (过多的输出,... ) creating: database/stage/Components/oracle.blaslapack/12.2.0.1.0/1/DataFiles/ inflating: database/stage/Components/oracle.blaslapack/12.2.0.1.0/1/DataFiles/filegroup3.jar inflating: database/stage/shiphomeinfo.properties creating: database/stage/globalvariables/ inflating: database/stage/globalvariables/variable.properties inflating: database/stage/globalvariables/globalvar.xml inflating: database/stage/install1.jar inflating: database/runInstaller [oracle@oracle12c1 software]$ [oracle@oracle12c1 software]$ [oracle@oracle12c1 software]$ ls -ltr total 6340264 drwxr-xr-x 7 oracle oinstall 110 Jan 27 00:22 database -rwxrwxrwx. 1 root root 43938410 Mar 30 16:20 nomachine_5.2.11_1_x86_64.rpm -rwxrwxrwx. 1 root root 2994687209 Mar 30 16:22 linuxx64_12201_grid_home.zip -rwxrwxrwx. 1 root root 80968 Mar 30 16:22 oracleasm-support-2.1.8-3.el7.x86_64.rpm -rwxrwxrwx. 1 root root 19360 Mar 30 16:22 oracleasmlib-2.0.12-1.el7.x86_64.rpm -rwxrwxrwx. 1 root root 3453696911 Mar 30 16:23 linuxx64_12201_database.zip [oracle@oracle12c1 software]$ [oracle@oracle12c1 software]$ cd database [oracle@oracle12c1 database]$ ls -ltr total 24 -rwxr-xr-x 1 oracle oinstall 500 Feb 7 2013 welcome.html drwxr-xr-x 4 oracle oinstall 4096 Jan 26 22:39 install -rwxr-xr-x 1 oracle oinstall 8771 Jan 26 22:39 runInstaller drwxr-xr-x 2 oracle oinstall 34 Jan 26 22:39 rpm drwxrwxr-x 2 oracle oinstall 28 Jan 26 23:53 sshsetup drwxrwxr-x 2 oracle oinstall 58 Jan 26 23:53 response drwxr-xr-x 14 oracle oinstall 4096 Jan 26 23:55 stage [oracle@oracle12c1 database]$
启动OUI安装:
[oracle@oracle12c1 database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 12605 MB Passed Checking swap space: must be greater than 150 MB. Actual 6759 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-03-31_12-13-59AM. Please wait ...[oracle@oracle12c1 database]$ [oracle@oracle12c1 database]$
这里,注意:
————————————————————————
当物理内存大于5GB的时候,将不支持自动内存管理。
如下:
————————————————————————
然后,将会等待较长的一段时间。
2017年3月31日01:08:06
脚本:
节点一:
[root@oracle12c1 ~]# /u01/app/oracle/product/12/db_1/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/12/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite. The contents of "oraenv" have not changed. No need to overwrite. The contents of "coraenv" have not changed. No need to overwrite. 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. [root@oracle12c1 ~]#
节点二:
[root@oracle12c2 ~]# /u01/app/oracle/product/12/db_1/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/12/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite. The contents of "oraenv" have not changed. No need to overwrite. The contents of "coraenv" have not changed. No need to overwrite. 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. [root@oracle12c2 ~]#
然后,OUI调用DBCA建库:LENKA。
最后,安装成功:
安装完成后,查看现在RAC的状态:
[root@oracle12c1 ~]# su - grid Last login: Fri Mar 31 09:22:53 CST 2017 [grid@oracle12c1 ~]$ crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.DATA01.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.GIMR.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oracle12c1 ora....AF.lsnr ora....er.type 0/5 0/ OFFLINE OFFLINE ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.MGMTLSNR ora....nr.type 0/0 0/0 ONLINE ONLINE oracle12c1 ora.OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.asm ora.asm.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.chad ora.chad.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE oracle12c1 ora.lenka.db ora....se.type 0/2 0/1 ONLINE ONLINE oracle12c2 ora.mgmtdb ora....db.type 0/2 0/1 ONLINE ONLINE oracle12c1 ora....network ora....rk.type 0/5 0/ ONLINE ONLINE oracle12c1 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE oracle12c1 ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE oracle12c1 ora....2c1.ons application 0/3 0/0 ONLINE ONLINE oracle12c1 ora....2c1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE oracle12c1 ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE oracle12c2 ora....2c2.ons application 0/3 0/0 ONLINE ONLINE oracle12c2 ora....2c2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE oracle12c2 ora.proxy_advm ora....vm.type 0/5 0/ OFFLINE OFFLINE ora.qosmserver ora....er.type 0/1 0/2 ONLINE ONLINE oracle12c1 ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE oracle12c1 [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ crs_stat -l NAME=ora.ASMNET1LSNR_ASM.lsnr TYPE=ora.asm_listener.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.ASMNET2LSNR_ASM.lsnr TYPE=ora.asm_listener.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.DATA01.dg TYPE=ora.diskgroup.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.GIMR.dg TYPE=ora.diskgroup.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.LISTENER.lsnr TYPE=ora.listener.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.LISTENER_LEAF.lsnr TYPE=ora.leaf_listener.type TARGET=OFFLINE STATE=OFFLINE NAME=ora.LISTENER_SCAN1.lsnr TYPE=ora.scan_listener.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.MGMTLSNR TYPE=ora.mgmtlsnr.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.OCR.dg TYPE=ora.diskgroup.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.asm TYPE=ora.asm.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.chad TYPE=ora.chad.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.cvu TYPE=ora.cvu.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.lenka.db TYPE=ora.database.type TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.mgmtdb TYPE=ora.mgmtdb.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.net1.network TYPE=ora.network.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.ons TYPE=ora.ons.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.LISTENER_ORACLE12C1.lsnr TYPE=application TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.ons TYPE=application TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.vip TYPE=ora.cluster_vip_net1.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c2.LISTENER_ORACLE12C2.lsnr TYPE=application TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.oracle12c2.ons TYPE=application TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.oracle12c2.vip TYPE=ora.cluster_vip_net1.type TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.proxy_advm TYPE=ora.proxy_advm.type TARGET=OFFLINE STATE=OFFLINE NAME=ora.qosmserver TYPE=ora.qosmserver.type TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.scan1.vip TYPE=ora.scan_vip.type TARGET=ONLINE STATE=ONLINE on oracle12c1 [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ crs_stat -v NAME=ora.ASMNET1LSNR_ASM.lsnr TYPE=ora.asm_listener.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.ASMNET2LSNR_ASM.lsnr TYPE=ora.asm_listener.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.DATA01.dg TYPE=ora.diskgroup.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.GIMR.dg TYPE=ora.diskgroup.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.LISTENER.lsnr TYPE=ora.listener.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.LISTENER_LEAF.lsnr TYPE=ora.leaf_listener.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=OFFLINE STATE=OFFLINE NAME=ora.LISTENER_SCAN1.lsnr TYPE=ora.scan_listener.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.MGMTLSNR TYPE=ora.mgmtlsnr.type RESTART_ATTEMPTS=0 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.OCR.dg TYPE=ora.diskgroup.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.asm TYPE=ora.asm.type GEN_USR_ORA_INST_NAME@SERVERNAME(oracle12c1)=+ASM1 GEN_USR_ORA_INST_NAME@SERVERNAME(oracle12c2)=+ASM2 RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.chad TYPE=ora.chad.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.cvu TYPE=ora.cvu.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.lenka.db TYPE=ora.database.type GEN_RESTART@SERVERNAME(oracle12c1)=StartCompleted GEN_RESTART@SERVERNAME(oracle12c2)=StartCompleted GEN_USR_ORA_INST_NAME@SERVERNAME(oracle12c1)=lenka_2 GEN_USR_ORA_INST_NAME@SERVERNAME(oracle12c2)=lenka_1 RESTART_ATTEMPTS=2 RESTART_COUNT=0 FAILURE_THRESHOLD=1 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.mgmtdb TYPE=ora.mgmtdb.type GEN_RESTART@SERVERNAME(oracle12c1)=StartCompleted GEN_USR_ORA_INST_NAME@SERVERNAME(oracle12c1)=-MGMTDB RESTART_ATTEMPTS=2 RESTART_COUNT=0 FAILURE_THRESHOLD=1 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.net1.network TYPE=ora.network.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.ons TYPE=ora.ons.type RESTART_ATTEMPTS=3 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.LISTENER_ORACLE12C1.lsnr TYPE=application RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.ons TYPE=application RESTART_ATTEMPTS=3 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c1.vip TYPE=ora.cluster_vip_net1.type RESTART_ATTEMPTS=0 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.oracle12c2.LISTENER_ORACLE12C2.lsnr TYPE=application RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.oracle12c2.ons TYPE=application RESTART_ATTEMPTS=3 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.oracle12c2.vip TYPE=ora.cluster_vip_net1.type RESTART_ATTEMPTS=0 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c2 NAME=ora.proxy_advm TYPE=ora.proxy_advm.type RESTART_ATTEMPTS=5 RESTART_COUNT=0 FAILURE_THRESHOLD= FAILURE_COUNT=0 TARGET=OFFLINE STATE=OFFLINE NAME=ora.qosmserver TYPE=ora.qosmserver.type RESTART_ATTEMPTS=1 RESTART_COUNT=0 FAILURE_THRESHOLD=2 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 NAME=ora.scan1.vip TYPE=ora.scan_vip.type RESTART_ATTEMPTS=0 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on oracle12c1 [grid@oracle12c1 ~]$
四、RAC集群的各个资源的分布情况
IP资源:
节点一:
[root@oracle12c1 ~]# ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens32: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:84:32:df brd ff:ff:ff:ff:ff:ff inet 10.158.1.46/24 brd 10.158.1.255 scope global ens32 inet 10.158.1.94/24 brd 10.158.1.255 scope global secondary ens32:1 inet 10.158.1.96/24 brd 10.158.1.255 scope global secondary ens32:2 inet6 fe80::250:56ff:fe84:32df/64 scope link valid_lft forever preferred_lft forever 3: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:84:2f:5b brd ff:ff:ff:ff:ff:ff inet 192.168.25.11/24 brd 192.168.25.255 scope global ens33 inet 169.254.55.213/17 brd 169.254.127.255 scope global ens33:1 inet6 fe80::250:56ff:fe84:2f5b/64 scope link valid_lft forever preferred_lft forever 4: ens34: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:84:2b:98 brd ff:ff:ff:ff:ff:ff inet 192.168.26.11/24 brd 192.168.26.255 scope global ens34 inet 169.254.149.252/17 brd 169.254.255.255 scope global ens34:1 inet6 fe80::250:56ff:fe84:2b98/64 scope link valid_lft forever preferred_lft forever [root@oracle12c1 ~]# [root@oracle12c1 ~]# ifconfig ens32: flags=4163 mtu 1500 inet 10.158.1.46 netmask 255.255.255.0 broadcast 10.158.1.255 inet6 fe80::250:56ff:fe84:32df prefixlen 64 scopeid 0x20 ether 00:50:56:84:32:df txqueuelen 1000 (Ethernet) RX packets 20010347 bytes 11122366880 (10.3 GiB) RX errors 0 dropped 505 overruns 0 frame 0 TX packets 50047911 bytes 81436405929 (75.8 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens32:1: flags=4163 mtu 1500 inet 10.158.1.94 netmask 255.255.255.0 broadcast 10.158.1.255 ether 00:50:56:84:32:df txqueuelen 1000 (Ethernet) ens32:2: flags=4163 mtu 1500 inet 10.158.1.96 netmask 255.255.255.0 broadcast 10.158.1.255 ether 00:50:56:84:32:df txqueuelen 1000 (Ethernet) ens33: flags=4163 mtu 1500 inet 192.168.25.11 netmask 255.255.255.0 broadcast 192.168.25.255 inet6 fe80::250:56ff:fe84:2f5b prefixlen 64 scopeid 0x20 ether 00:50:56:84:2f:5b txqueuelen 1000 (Ethernet) RX packets 319376 bytes 56472902 (53.8 MiB) RX errors 0 dropped 489 overruns 0 frame 0 TX packets 1104446 bytes 609955504 (581.6 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens33:1: flags=4163 mtu 1500 inet 169.254.55.213 netmask 255.255.128.0 broadcast 169.254.127.255 ether 00:50:56:84:2f:5b txqueuelen 1000 (Ethernet) ens34: flags=4163 mtu 1500 inet 192.168.26.11 netmask 255.255.255.0 broadcast 192.168.26.255 inet6 fe80::250:56ff:fe84:2b98 prefixlen 64 scopeid 0x20 ether 00:50:56:84:2b:98 txqueuelen 1000 (Ethernet) RX packets 4478587 bytes 3541790091 (3.2 GiB) RX errors 0 dropped 493 overruns 0 frame 0 TX packets 2065573 bytes 1045984209 (997.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens34:1: flags=4163 mtu 1500 inet 169.254.149.252 netmask 255.255.128.0 broadcast 169.254.255.255 ether 00:50:56:84:2b:98 txqueuelen 1000 (Ethernet) lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 2219584 bytes 2206767058 (2.0 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2219584 bytes 2206767058 (2.0 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@oracle12c1 ~]#
节点二:
[root@oracle12c2 ~]# ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens32: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:84:31:e2 brd ff:ff:ff:ff:ff:ff inet 10.158.1.157/24 brd 10.158.1.255 scope global ens32 inet 10.158.1.95/24 brd 10.158.1.255 scope global secondary ens32:1 inet6 fe80::250:56ff:fe84:31e2/64 scope link valid_lft forever preferred_lft forever 3: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:84:3f:c8 brd ff:ff:ff:ff:ff:ff inet 192.168.25.12/24 brd 192.168.25.255 scope global ens33 inet 169.254.5.70/17 brd 169.254.127.255 scope global ens33:1 inet6 fe80::250:56ff:fe84:3fc8/64 scope link valid_lft forever preferred_lft forever 4: ens34: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:84:36:d4 brd ff:ff:ff:ff:ff:ff inet 192.168.26.12/24 brd 192.168.26.255 scope global ens34 inet 169.254.222.201/17 brd 169.254.255.255 scope global ens34:1 inet6 fe80::250:56ff:fe84:36d4/64 scope link valid_lft forever preferred_lft forever [root@oracle12c2 ~]# [root@oracle12c2 ~]# ifconfig ens32: flags=4163 mtu 1500 inet 10.158.1.157 netmask 255.255.255.0 broadcast 10.158.1.255 inet6 fe80::250:56ff:fe84:31e2 prefixlen 64 scopeid 0x20 ether 00:50:56:84:31:e2 txqueuelen 1000 (Ethernet) RX packets 9215443 bytes 12279233596 (11.4 GiB) RX errors 0 dropped 503 overruns 0 frame 0 TX packets 3629306 bytes 1487469953 (1.3 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens32:1: flags=4163 mtu 1500 inet 10.158.1.95 netmask 255.255.255.0 broadcast 10.158.1.255 ether 00:50:56:84:31:e2 txqueuelen 1000 (Ethernet) ens33: flags=4163 mtu 1500 inet 192.168.25.12 netmask 255.255.255.0 broadcast 192.168.25.255 inet6 fe80::250:56ff:fe84:3fc8 prefixlen 64 scopeid 0x20 ether 00:50:56:84:3f:c8 txqueuelen 1000 (Ethernet) RX packets 1299168 bytes 636947726 (607.4 MiB) RX errors 0 dropped 499 overruns 0 frame 0 TX packets 3150301 bytes 3450415899 (3.2 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens33:1: flags=4163 mtu 1500 inet 169.254.5.70 netmask 255.255.128.0 broadcast 169.254.127.255 ether 00:50:56:84:3f:c8 txqueuelen 1000 (Ethernet) ens34: flags=4163 mtu 1500 inet 192.168.26.12 netmask 255.255.255.0 broadcast 192.168.26.255 inet6 fe80::250:56ff:fe84:36d4 prefixlen 64 scopeid 0x20 ether 00:50:56:84:36:d4 txqueuelen 1000 (Ethernet) RX packets 7770823 bytes 9318184836 (8.6 GiB) RX errors 0 dropped 503 overruns 0 frame 0 TX packets 1258654 bytes 842314970 (803.2 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens34:1: flags=4163 mtu 1500 inet 169.254.222.201 netmask 255.255.128.0 broadcast 169.254.255.255 ether 00:50:56:84:36:d4 txqueuelen 1000 (Ethernet) lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 915851 bytes 165590533 (157.9 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 915851 bytes 165590533 (157.9 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@oracle12c2 ~]#
挂载点的使用情况:
节点一:
[root@oracle12c1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/ol-root 40G 36G 4.2G 90% / devtmpfs 7.9G 0 7.9G 0% /dev tmpfs 7.9G 645M 7.3G 9% /dev/shm tmpfs 7.9G 18M 7.9G 1% /run tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup /dev/mapper/ol-home 20G 33M 20G 1% /home /dev/sda1 497M 132M 365M 27% /boot /dev/sr0 3.6G 3.6G 0 100% /run/media/root/RHEL-7.3 Server.x86_64 [root@oracle12c1 ~]#
节点二:
[root@oracle12c2 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/ol_oracle12c2-root 40G 25G 16G 61% / devtmpfs 7.9G 0 7.9G 0% /dev tmpfs 7.9G 645M 7.3G 9% /dev/shm tmpfs 7.9G 34M 7.9G 1% /run tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup /dev/mapper/ol_oracle12c2-home 20G 33M 20G 1% /home /dev/sda1 497M 132M 365M 27% /boot /dev/sr0 3.6G 3.6G 0 100% /run/media/root/RHEL-7.3 Server.x86_64 [root@oracle12c2 ~]#
ASM磁盘组的使用情况:
[grid@oracle12c1 ~]$ asmcmd ASMCMD> lsdg State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 512 4096 4194304 292956 286924 0 286924 0 N DATA01/ MOUNTED EXTERN N 512 512 4096 4194304 39936 6080 0 6080 0 N GIMR/ MOUNTED EXTERN N 512 512 4096 4194304 4096 3760 0 3760 0 Y OCR/ ASMCMD> ASMCMD> ls OCR ASM/ oracle-cluster/ orapwasm ASMCMD> ls GIMR ASM/ _mgmtdb/ oracle-cluster/ orapwasm_backup ASMCMD> ls DATA01 lenka/ ASMCMD> exit [grid@oracle12c1 ~]$
监听器的情况:
节点一:
[grid@oracle12c1 ~]$ ps -ef | grep lsnr grid 4940 1 0 Mar30 ? 00:00:01 /u01/app/12/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit grid 7862 1 0 Mar30 ? 00:00:19 /u01/app/12/grid/bin/tnslsnr ASMNET2LSNR_ASM -no_crs_notify -inherit grid 7863 1 0 Mar30 ? 00:00:18 /u01/app/12/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit grid 12400 1 0 Mar30 ? 00:00:01 /u01/app/12/grid/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit grid 22461 21322 0 09:44 pts/2 00:00:00 grep --color=auto lsnr grid 26143 1 0 Mar30 ? 00:00:01 /u01/app/12/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ lsnrctl status MGMTLSNR LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAR-2017 09:46:00 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=MGMTLSNR))) STATUS of the LISTENER ------------------------ Alias MGMTLSNR Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 30-MAR-2017 22:11:45 Uptime 0 days 11 hr. 34 min. 18 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/oracle12c1/mgmtlsnr/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=MGMTLSNR))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.26.11)(PORT=1525))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.25.11)(PORT=1525))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=169.254.55.213)(PORT=1525))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.158.1.94)(PORT=1525))) Services Summary... Service "-MGMTDBXDB" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "4bf44dcb14231b85e0532e019e0a03ae" has 1 instance(s). Instance "-MGMTDB", status READY, has 2 handler(s) for this service... Service "_mgmtdb" has 1 instance(s). Instance "-MGMTDB", status READY, has 2 handler(s) for this service... Service "gimr_dscrep_10" has 1 instance(s). Instance "-MGMTDB", status READY, has 2 handler(s) for this service... The command completed successfully [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ lsnrctl status ASMNET2LSNR_ASM LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAR-2017 09:52:38 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET2LSNR_ASM))) STATUS of the LISTENER ------------------------ Alias ASMNET2LSNR_ASM Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 30-MAR-2017 19:55:34 Uptime 0 days 13 hr. 57 min. 10 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/oracle12c1/asmnet2lsnr_asm/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=ASMNET2LSNR_ASM))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.26.11)(PORT=1527))) Services Summary... Service "+ASM" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_DATA01" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_GIMR" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_OCR" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... The command completed successfully [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ lsnrctl status ASMNET1LSNR_ASM LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAR-2017 09:46:48 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM))) STATUS of the LISTENER ------------------------ Alias ASMNET1LSNR_ASM Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 30-MAR-2017 19:55:34 Uptime 0 days 13 hr. 51 min. 20 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/oracle12c1/asmnet1lsnr_asm/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=ASMNET1LSNR_ASM))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.25.11)(PORT=1526))) Services Summary... Service "+ASM" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_DATA01" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_GIMR" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_OCR" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... The command completed successfully [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ lsnrctl status LISTENER_SCAN1 LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAR-2017 09:47:06 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))) STATUS of the LISTENER ------------------------ Alias LISTENER_SCAN1 Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 30-MAR-2017 20:06:29 Uptime 0 days 13 hr. 40 min. 42 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/oracle12c1/listener_scan1/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.158.1.96)(PORT=1521))) Services Summary... Service "-MGMTDBXDB" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "4bf44dcb14231b85e0532e019e0a03ae" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "4bf7dd199d674603e0532e019e0a7cb1" has 2 instance(s). Instance "lenka_1", status READY, has 1 handler(s) for this service... Instance "lenka_2", status READY, has 1 handler(s) for this service... Service "_mgmtdb" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "gimr_dscrep_10" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "lenka" has 2 instance(s). Instance "lenka_1", status READY, has 1 handler(s) for this service... Instance "lenka_2", status READY, has 1 handler(s) for this service... Service "lenkaXDB" has 2 instance(s). Instance "lenka_1", status READY, has 1 handler(s) for this service... Instance "lenka_2", status READY, has 1 handler(s) for this service... Service "lenkapdb" has 2 instance(s). Instance "lenka_1", status READY, has 1 handler(s) for this service... Instance "lenka_2", status READY, has 1 handler(s) for this service... The command completed successfully [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ lsnrctl status LISTENER LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAR-2017 09:47:20 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 30-MAR-2017 20:28:41 Uptime 0 days 13 hr. 18 min. 43 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/oracle12c1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.158.1.46)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.158.1.94)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=oracle12c1)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12/db_1/admin/lenka/xdb_wallet))(Presentation=HTTP)(Session=RAW)) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA01" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_GIMR" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_OCR" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "4bf7dd199d674603e0532e019e0a7cb1" has 1 instance(s). Instance "lenka_2", status READY, has 1 handler(s) for this service... Service "lenka" has 1 instance(s). Instance "lenka_2", status READY, has 1 handler(s) for this service... Service "lenkaXDB" has 1 instance(s). Instance "lenka_2", status READY, has 1 handler(s) for this service... Service "lenkapdb" has 1 instance(s). Instance "lenka_2", status READY, has 1 handler(s) for this service... The command completed successfully [grid@oracle12c1 ~]$ [grid@oracle12c1 ~]$ cd $ORACLE_HOME/network/admin [grid@oracle12c1 admin]$ ls endpoints_listener.ora listener1703309PM3923.bak listener.ora listener.ora.bak.oracle12c1 samples shrept.lst sqlnet.ora [grid@oracle12c1 admin]$ [grid@oracle12c1 admin]$ cat endpoints_listener.ora #Backup file is /u01/app/12/grid/network/admin/endpoints_listener.ora.bak.oracle12c1 line added by Agent LISTENER_ORACLE12C1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle12c1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.158.1.46)(PORT=1521)(IP=FIRST)))) # line added by Agent [grid@oracle12c1 admin]$ [grid@oracle12c1 admin]$ cat listener.ora MGMTLSNR=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=MGMTLSNR)))) # line added by Agent # listener.ora Network Configuration File: /u01/app/12/grid/network/admin/listener.ora # Generated by Oracle configuration tools. ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON VALID_NODE_CHECKING_REGISTRATION_LISTENER_SCAN1 = OFF VALID_NODE_CHECKING_REGISTRATION_ASMNET2LSNR_ASM = SUBNET VALID_NODE_CHECKING_REGISTRATION_ASMNET1LSNR_ASM = SUBNET ASMNET2LSNR_ASM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = ASMNET2LSNR_ASM)) ) ) ASMNET1LSNR_ASM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = ASMNET1LSNR_ASM)) ) ) VALID_NODE_CHECKING_REGISTRATION_LISTENER = SUBNET LISTENER = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER)) ) ) ENABLE_GLOBAL_DYNAMIC_ENDPOINT_ASMNET2LSNR_ASM = ON ENABLE_GLOBAL_DYNAMIC_ENDPOINT_ASMNET1LSNR_ASM = ON ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON LISTENER_SCAN1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1)) ) ) ENABLE_GLOBAL_DYNAMIC_ENDPOINT_MGMTLSNR=ON # line added by Agent VALID_NODE_CHECKING_REGISTRATION_MGMTLSNR=SUBNET # line added by Agent [grid@oracle12c1 admin]$ [grid@oracle12c1 admin]$ cat sqlnet.ora # sqlnet.ora.oracle12c1 Network Configuration File: /u01/app/12/grid/network/admin/sqlnet.ora.oracle12c1 # Generated by Oracle configuration tools. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) [grid@oracle12c1 admin]$ [root@oracle12c1 ~]# su - oracle Last login: Fri Mar 31 09:01:22 CST 2017 [oracle@oracle12c1 ~]$ cd $ORACLE_HOME/network/admin [oracle@oracle12c1 admin]$ ls samples shrept.lst tnsnames.ora [oracle@oracle12c1 admin]$ [oracle@oracle12c1 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/12/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. LENKA = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = cloud-scan1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = lenka) ) ) [oracle@oracle12c1 admin]$
节点二:
[root@oracle12c2 ~]# su - grid Last login: Fri Mar 31 09:39:08 CST 2017 [grid@oracle12c2 ~]$ ps -ef | grep lsnr grid 29928 29878 0 09:44 pts/0 00:00:00 grep --color=auto lsnr grid 30841 1 0 Mar30 ? 00:00:17 /u01/app/12/grid/bin/tnslsnr ASMNET2LSNR_ASM -no_crs_notify -inherit grid 30843 1 0 Mar30 ? 00:00:17 /u01/app/12/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit grid 32324 1 0 Mar30 ? 00:00:01 /u01/app/12/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit [grid@oracle12c2 ~]$ [grid@oracle12c2 ~]$ lsnrctl status ASMNET2LSNR_ASM LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAR-2017 09:51:05 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET2LSNR_ASM))) STATUS of the LISTENER ------------------------ Alias ASMNET2LSNR_ASM Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 30-MAR-2017 20:51:51 Uptime 0 days 12 hr. 59 min. 19 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/oracle12c2/asmnet2lsnr_asm/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=ASMNET2LSNR_ASM))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.26.12)(PORT=1527))) Services Summary... Service "+ASM" has 2 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... Service "+ASM_DATA01" has 2 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... Service "+ASM_GIMR" has 2 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... Service "+ASM_OCR" has 2 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... The command completed successfully [grid@oracle12c2 ~]$ [grid@oracle12c2 ~]$ lsnrctl status ASMNET1LSNR_ASM LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAR-2017 09:51:31 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM))) STATUS of the LISTENER ------------------------ Alias ASMNET1LSNR_ASM Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 30-MAR-2017 20:51:51 Uptime 0 days 12 hr. 59 min. 44 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/oracle12c2/asmnet1lsnr_asm/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=ASMNET1LSNR_ASM))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.25.12)(PORT=1526))) Services Summary... Service "+ASM" has 2 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... Service "+ASM_DATA01" has 2 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... Service "+ASM_GIMR" has 2 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... Service "+ASM_OCR" has 2 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... The command completed successfully [grid@oracle12c2 ~]$ [grid@oracle12c2 ~]$ lsnrctl status LISTENER LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAR-2017 09:53:54 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 30-MAR-2017 20:54:51 Uptime 0 days 12 hr. 59 min. 8 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/oracle12c2/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.158.1.157)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.158.1.95)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=oracle12c2)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12/db_1/admin/lenka/xdb_wallet))(Presentation=HTTP)(Session=RAW)) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_DATA01" has 1 instance(s). Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_GIMR" has 1 instance(s). Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "+ASM_OCR" has 1 instance(s). Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "4bf7dd199d674603e0532e019e0a7cb1" has 1 instance(s). Instance "lenka_1", status READY, has 1 handler(s) for this service... Service "lenka" has 1 instance(s). Instance "lenka_1", status READY, has 1 handler(s) for this service... Service "lenkaXDB" has 1 instance(s). Instance "lenka_1", status READY, has 1 handler(s) for this service... Service "lenkapdb" has 1 instance(s). Instance "lenka_1", status READY, has 1 handler(s) for this service... The command completed successfully [grid@oracle12c2 ~]$ [grid@oracle12c2 ~]$ cd $ORACLE_HOME/network/admin [grid@oracle12c2 admin]$ ls endpoints_listener.ora listener.ora listener.ora.bak.oracle12c2 samples shrept.lst sqlnet.ora [grid@oracle12c2 admin]$ [grid@oracle12c2 admin]$ cat endpoints_listener.ora #Backup file is /u01/app/12/grid/network/admin/endpoints_listener.ora.bak.oracle12c2 line added by Agent LISTENER_ORACLE12C2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle12c2-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.158.1.157)(PORT=1521)(IP=FIRST)))) # line added by Agent [grid@oracle12c2 admin]$ [grid@oracle12c2 admin]$ cat listener.ora LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent ASMNET1LSNR_ASM=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM)))) # line added by Agent ASMNET2LSNR_ASM=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET2LSNR_ASM)))) # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_ASMNET2LSNR_ASM=ON # line added by Agent VALID_NODE_CHECKING_REGISTRATION_ASMNET2LSNR_ASM=SUBNET # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_ASMNET1LSNR_ASM=ON # line added by Agent VALID_NODE_CHECKING_REGISTRATION_ASMNET1LSNR_ASM=SUBNET # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent VALID_NODE_CHECKING_REGISTRATION_LISTENER=SUBNET # line added by Agent [grid@oracle12c2 admin]$ [grid@oracle12c2 admin]$ cat sqlnet.ora # sqlnet.ora.oracle12c2 Network Configuration File: /u01/app/12/grid/network/admin/sqlnet.ora.oracle12c2 # Generated by Oracle configuration tools. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) [grid@oracle12c2 admin]$ exit logout [root@oracle12c2 ~]# su - oracle Last login: Fri Mar 31 09:51:07 CST 2017 [oracle@oracle12c2 ~]$ cd $ORACLE_HOME/network/admin [oracle@oracle12c2 admin]$ ls samples shrept.lst tnsnames.ora [oracle@oracle12c2 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/12/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. LENKA = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = cloud-scan1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = lenka) ) ) [oracle@oracle12c2 admin]$
数据库实例运行情况:
节点一:
[oracle@oracle12c1 ~]$ ps -ef | grep pmon grid 5018 1 0 Mar30 ? 00:00:03 mdb_pmon_-MGMTDB oracle 15649 1 0 02:22 ? 00:00:02 ora_pmon_lenka_2 grid 26574 1 0 Mar30 ? 00:00:03 asm_pmon_+ASM1 oracle 28628 28517 0 10:04 pts/2 00:00:00 grep --color=auto pmon [oracle@oracle12c1 ~]$
节点二:
[oracle@oracle12c2 admin]$ ps -ef | grep pmon oracle 2711 552 0 10:04 pts/0 00:00:00 grep --color=auto pmon oracle 8427 1 0 02:22 ? 00:00:02 ora_pmon_lenka_1 grid 31309 1 0 Mar30 ? 00:00:03 asm_pmon_+ASM2 [oracle@oracle12c2 admin]$
五、终了:
结束。
————————
Done。