Oracle19c RAC for Centos7.6安装手册

目录

1、环境

1.1、系统版本:

2、准备工作(a机与b机都同时配置)

2.1、配置本地yum源:

2.2、安装rpm依赖包

2.3、创建用户 

2.4、配置host表 

2.5、禁用NTP

2.6、创建所需要目录

 2.7、其它配置:

2.8、配置环境变量 

2.9、配置共享磁盘权限

2.10、配置互信

2.11、在grid安装文件中安装 cvuqdisk

3、开始安装grid

3.1、执行安装

3.2、执行root脚本 

3.3、查看状态 

4、安装Oracle数据库软件

4.1、执行安装 

 4.2、执行root脚本

5、创建ASM数据磁盘

6、建立数据库

6.2、执行建库dbca

6.2、查看状态



1、环境

1.1、系统版本:

[root@rac19c1 Packages]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 

2、准备工作(a机与b机都同时配置)

2.1、配置本地yum源:

https://blog.csdn.net/jisen_huang/article/details/104829902

2.2、安装rpm依赖包

yum -y install bc gcc gcc-c++  binutils  make gdb cmake  glibc ksh elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc-devel libaio libaio-devel libXrender libXrender-devel libX11 libXau sysstat libXi libXtst libgcc librdmacm-devel libstdc++ libstdc++-devel libxcb net-tools nfs-utils compat-libcap1 compat-libstdc++  smartmontools  targetcli python python-configshell python-rtslib python-six  unixODBC unixODBC-devel
ls -l compat* elfutils* | awk -v rpmpackage="" '{rpmpackage=$NF" "rpmpackage}END{print "yum -y localinstall "rpmpackage}' | bash

 

2.3、创建用户 

groupadd -g 11001 oinstall  
groupadd -g 11002 dba  
groupadd -g 11003 oper  
groupadd -g 11004 backupdba  
groupadd -g 11005 dgdba  
groupadd -g 11006 kmdba  
groupadd -g 11007 asmdba  
groupadd -g 11008 asmoper  
groupadd -g 11009 asmadmin  
groupadd -g 11010 racdba  
useradd -u 11011 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle  
useradd -u 11012 -g oinstall -G asmadmin,asmdba,asmoper,dba grid

2.4、配置host表 

[root@rac19c1 Packages]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.31.174  rac19c1
192.168.31.175  rac19c2
192.168.31.176  rac19c1-vip
192.168.31.177  rac19c2-vip
192.168.31.178  rac19c-scan
19.21.68.174    rac19c1-priv
19.21.68.175    rac19c2-priv

2.5、禁用NTP

[root@rac19c1 ~]#  systemctl stop ntpd.service
[root@rac19c1 ~]# systemctl disable ntpd.service
[root@rac19c1 ~]# mv /etc/ntp.conf /etc/ntp.conf.orig
[root@rac19c1 ~]# systemctl status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

2.6、创建所需要目录

mkdir -p /u01/app/19.0.0/grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/19.0.0/db_1
chown -R grid:oinstall /u01/app/grid
chown -R grid:oinstall /u01/app/19.0.0/grid
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/

 2.7、其它配置:

[root@rac19c1 ~]# cat /etc/security/limits.d/20-nproc.conf 
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

#*          soft    nproc     4096
root       soft    nproc     unlimited
#增加下面一行
* - nproc 16384
# End of file
grid  soft  nproc 16384
grid  hard  nproc 16384
grid  soft  nofile 1024
grid  hard  nofile 65536
grid  soft  stack 10240
grid  hard  stack 32768
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack  10240
oracle hard stack  32768
oracle hard memlock 4194304
oracle soft memlock 4194304
##memlock这个值还是应该比内存配置略小,也就是要配置的足够大。单位:k
##4194304 表示4G
[root@rac19c1 ~]# cat /etc/security/limits.conf
-session   optional     pam_ck_connector.so

#ORACLE SETTING
session required pam_limits.so
~
"/etc/pam.d/login" 21L, 844C written
[root@rac19c1 ~]#  vi /etc/pam.d/login 
[root@rac19c1 ~]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
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 = 1048576

 

停止avahi-daemon服务

[root@rac19c1 ~]# systemctl disable avahi-daemon.socket
Removed symlink /etc/systemd/system/sockets.target.wants/avahi-daemon.socket.
[root@rac19c1 ~]# systemctl disable avahi-daemon.service
Removed symlink /etc/systemd/system/multi-user.target.wants/avahi-daemon.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.Avahi.service.
[root@rac19c1 ~]# ps -ef|grep avahi-daemon
avahi     2674     1  0 18:28 ?        00:00:00 avahi-daemon: running [linux.local]
avahi     2704  2674  0 18:28 ?        00:00:00 avahi-daemon: chroot helper
root     16251 15578  0 18:45 pts/1    00:00:00 grep --color=auto avahi-daemon
[root@rac19c1 ~]# kill -9 2674 2704
[root@rac19c1 ~]# ps -ef|grep avahi-daemon
root     16254 15578  0 18:45 pts/1    00:00:00 grep --color=auto avahi-daemon

编辑network文件

[root@rac19c1 ~]# cat /etc/sysconfig/network
# Created by anaconda
NOZEROCONF=yes

2.8、配置环境变量 

[root@rac19c1 oracle]# 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 ORACLE_SID=+ASM1; 
export ORACLE_BASE=/u01/app/grid; 
export ORACLE_HOME=/u01/app/19.0.0/grid; 
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; 
export PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib


[root@rac19c1 oracle]# 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 ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1
export ORACLE_SID=RACDB1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

2.9、配置共享磁盘权限

[root@rac19c1 oracle]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
360003ff44dc75adc8cec9cce0033f402
[root@rac19c1 oracle]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc
360003ff44dc75adc9ba684d395391bae
[root@rac19c1 oracle]# 

无多路径

[root@rac19c1 dev]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sdb", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="360003ff44dc75adc8cec9cce0033f402",  OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdc", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name",RESULT=="360003ff44dc75adc9ba684d395391bae",  OWNER="grid", GROUP="asmadmin", MODE="0660"


[root@rac19c1 dev]#  /sbin/partprobe

[root@rac19c1 oracle]# systemctl restart systemd-udev-trigger.service


[root@rac19c1 dev]# ll |grep asm
brw-rw----. 1 grid asmadmin   8,  16 Mar 18 18:51 sdb
brw-rw----. 1 grid asmadmin   8,  32 Mar 18 18:51 sdc

多路径配置

[root@rac19c1 dev]# vi /etc/multipath.conf
multipaths {
        multipath {
                wwid 360003ff44dc75adc8cec9cce0033f402
                alias crs1
        }
        multipath {
                wwid 360003ff44dc75adc9ba684d395391bae
                alias data1
         }
}

[root@rac19c2 dev]# cat /etc/udev/rules.d/12-dm-permissions.rules
ENV{DM_NAME}=="crs1",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"
ENV{DM_NAME}=="data1",OWNER:="grid",GROUP:="asmadmin",MODE:="660",SYMLINK+="mapper/$env{DM_NAME}"


[root@rac19c1 Packages]# systemctl start multipathd.service
[root@rac19c1 Packages]#  multipath -ll
crs1 (360003ff44dc75adc8cec9cce0033f402) dm-3 MSFT    ,Virtual HD      
size=30G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
  `- 1:0:0:0 sdb 8:16 active ready running
data1 (360003ff44dc75adc9ba684d395391bae) dm-4 MSFT    ,Virtual HD      
size=25G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
  `- 1:0:0:1 sdc 8:32 active ready running

[root@rac19c2 dev]# /sbin/udevadm trigger --type=devices --action=change
[root@rac19c2 dev]# 
[root@rac19c2 dev]# 
[root@rac19c2 dev]# ll |grep dm
crw-------  1 root root      10,  61 Mar 27 18:33 cpu_dma_latency
brw-rw----  1 root disk     253,   0 Mar 27 18:33 dm-0
brw-rw----  1 root disk     253,   1 Mar 27 18:33 dm-1
brw-rw----  1 root disk     253,   2 Mar 27 18:33 dm-2
brw-rw----  1 grid asmadmin 253,   3 Mar 27 18:33 dm-3
brw-rw----  1 grid asmadmin 253,   4 Mar 27 18:33 dm-4
crw-------  1 root root       1,  12 Mar 27 18:33 oldmem
brw-rw----  1 grid asmadmin   8,  16 Mar 27 18:33 sdb
brw-rw----  1 grid asmadmin   8,  32 Mar 27 18:33 sdc

2.10、配置互信

grid:
cd /home/grid
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa



cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
ssh rac19c2 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh rac19c2 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac19c2:~/.ssh/authorized_keys
ssh rac19c1 date;ssh rac19c2 date;ssh rac19c1-priv date;ssh rac19c2-priv date


[grid@rac19c1 ~]$ ssh rac19c1 date;ssh rac19c2 date;ssh rac19c1-priv date;ssh rac19c2-priv date
Wed Mar 18 19:27:32 CST 2020
Wed Mar 18 19:27:32 CST 2020
Wed Mar 18 19:27:33 CST 2020
Wed Mar 18 19:27:33 CST 2020



oracle:
cd /home/oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa



cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
ssh rac19c2 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh rac19c2 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac19c2:~/.ssh/authorized_keys
ssh rac19c1 date;ssh rac19c2 date;ssh rac19c1-priv date;ssh rac19c2-priv date


[oracle@rac19c1 ~]$ ssh rac19c1 date;ssh rac19c2 date;ssh rac19c1-priv date;ssh rac19c2-priv date
Wed Mar 18 19:33:45 CST 2020
Wed Mar 18 19:33:45 CST 2020
Wed Mar 18 19:33:45 CST 2020
Wed Mar 18 19:33:45 CST 2020


2.11、在grid安装文件中安装 cvuqdisk

 

 


[root@rac19c1 rpm]# pwd
/u01/app/19.0.0/grid/cv/rpm
[root@rac19c1 rpm]# ls
cvuqdisk-1.0.10-1.rpm
[root@rac19c1 rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpm 

3、开始安装grid

3.1、执行安装

以grid账户登录图新化界面

 

 

[grid@rac19c1 grid]$ ./gridSetup.sh

 

 

 

 

3.2、执行root脚本 

[root@rac19c1 oraInventory]# sh /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

[root@rac19c2 ~]#  sh /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@rac19c1 oraInventory]# sh /u01/app/19.0.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.0.0/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/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/rac19c1/crsconfig/rootcrs_rac19c1_2020-03-26_09-37-30PM.log
2020/03/26 21:37:41 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/03/26 21:37:41 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/03/26 21:37:41 CLSRSC-363: User ignored prerequisites during installation
2020/03/26 21:37:41 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/03/26 21:37:44 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/03/26 21:37:44 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/03/26 21:37:45 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/03/26 21:37:45 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/03/26 21:38:15 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/26 21:38:15 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/03/26 21:38:18 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/03/26 21:38:25 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/03/26 21:38:25 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/03/26 21:38:29 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/03/26 21:38:29 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/26 21:38:50 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2020/03/26 21:38:54 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/03/26 21:38:58 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/03/26 21:39:02 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.

ASM has been created and started successfully.

[DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-200326PM093934.log for details.

2020/03/26 21:40:24 CLSRSC-482: Running command: '/u01/app/19.0.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk 737d53ea5a884f5abfd465a0e1f0e6f4.
Successfully replaced voting disk group with +CRS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   737d53ea5a884f5abfd465a0e1f0e6f4 (/dev/sdc) [CRS]
Located 1 voting disk(s).
2020/03/26 21:41:28 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/03/26 21:42:53 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/26 21:42:53 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/03/26 21:44:01 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/03/26 21:44:22 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@rac19c1 oraInventory]# 



[root@rac19c2 ~]# sh /u01/app/19.0.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.0.0/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/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/rac19c2/crsconfig/rootcrs_rac19c2_2020-03-26_09-45-21PM.log
2020/03/26 21:45:26 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/03/26 21:45:26 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/03/26 21:45:26 CLSRSC-363: User ignored prerequisites during installation
2020/03/26 21:45:26 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/03/26 21:45:27 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/03/26 21:45:27 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/03/26 21:45:27 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/03/26 21:45:27 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/03/26 21:45:29 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/03/26 21:45:29 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/03/26 21:45:31 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/03/26 21:45:31 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/03/26 21:45:33 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/03/26 21:45:33 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/26 21:45:51 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/26 21:45:54 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2020/03/26 21:45:55 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/03/26 21:45:57 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/03/26 21:45:58 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2020/03/26 21:46:06 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/03/26 21:46:50 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/26 21:46:50 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/03/26 21:47:02 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/03/26 21:47:10 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@rac19c2 ~]# 

3.3、查看状态 

[grid@rac19c2 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac19c1                  STABLE
               ONLINE  ONLINE       rac19c2                  STABLE
ora.chad
               ONLINE  ONLINE       rac19c1                  STABLE
               ONLINE  ONLINE       rac19c2                  STABLE
ora.net1.network
               ONLINE  ONLINE       rac19c1                  STABLE
               ONLINE  ONLINE       rac19c2                  STABLE
ora.ons
               ONLINE  ONLINE       rac19c1                  STABLE
               ONLINE  ONLINE       rac19c2                  STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  STABLE
      2        ONLINE  ONLINE       rac19c2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.CRS.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  STABLE
      2        ONLINE  ONLINE       rac19c2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac19c1                  STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  Started,STABLE
      2        ONLINE  ONLINE       rac19c2                  Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  STABLE
      2        ONLINE  ONLINE       rac19c2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac19c1                  STABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac19c1                  STABLE
ora.rac19c1.vip
      1        ONLINE  ONLINE       rac19c1                  STABLE
ora.rac19c2.vip
      1        ONLINE  ONLINE       rac19c2                  STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac19c1                  STABLE
--------------------------------------------------------------------------------
[grid@rac19c2 ~]$ 

4、安装Oracle数据库软件

以Oracle用户登录图形化界面

将数据库软件解压至$ORACLE_HOME

cd [oracle@rac19c1 ~]$ cd $ORACLE_HOME
[oracle@rac19c1 db_1]$ ls
addnode     ctx        demo         hs             jlib     odbc     oss      R              sdk           suptools
apex        cv         diagnostics  install        ldap     olap     oui      racg           slax          ucp
assistants  data       dmu          instantclient  lib      OPatch   owm      rdbms          sqldeveloper  usm
bin         dbjava     drdaas       inventory      md       opmn     perl     relnotes       sqlj          utl
clone       dbs        dv           javavm         mgw      oracore  plsql    root.sh        sqlpatch      wwg
crs         db.zip     env.ora      jdbc           network  ord      precomp  runInstaller   sqlplus       xdk
css         deinstall  has          jdk            nls      ords     QOpatch  schagent.conf  srvm
[oracle@rac19c1 db_1]$ pwd
/u01/app/oracle/product/19.0.0/db_1
[root@rac19c1 db_1]# ./runInstaller

4.1、执行安装 

 

 4.2、执行root脚本

[root@rac19c1 db_1]# sh /u01/app/oracle/product/19.0.0/db_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.0.0/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@rac19c2 ~]#  sh /u01/app/oracle/product/19.0.0/db_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.0.0/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.

点击ok后结束

5、创建ASM数据磁盘

grid账户登录图形化界面,执行asmca

6、建立数据库

以oracle账户登录。

6.2、执行建库dbca

 

 

6.2、查看状态

[grid@rac19c2 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac19c1                  STABLE
               ONLINE  ONLINE       rac19c2                  STABLE
ora.chad
               ONLINE  ONLINE       rac19c1                  STABLE
               ONLINE  ONLINE       rac19c2                  STABLE
ora.net1.network
               ONLINE  ONLINE       rac19c1                  STABLE
               ONLINE  ONLINE       rac19c2                  STABLE
ora.ons
               ONLINE  ONLINE       rac19c1                  STABLE
               ONLINE  ONLINE       rac19c2                  STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  STABLE
      2        ONLINE  ONLINE       rac19c2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.CRS.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  STABLE
      2        ONLINE  ONLINE       rac19c2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  STABLE
      2        ONLINE  ONLINE       rac19c2                  STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac19c1                  STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  Started,STABLE
      2        ONLINE  ONLINE       rac19c2                  Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac19c1                  STABLE
      2        ONLINE  ONLINE       rac19c2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       rac19c1                  STABLE
ora.orcl.db
      1        ONLINE  ONLINE       rac19c1                  Open,HOME=/u01/app/o
                                                             racle/product/19.0.0
                                                             /db_1,STABLE
      2        ONLINE  ONLINE       rac19c2                  Open,HOME=/u01/app/o
                                                             racle/product/19.0.0
                                                             /db_1,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac19c1                  STABLE
ora.rac19c1.vip
      1        ONLINE  ONLINE       rac19c1                  STABLE
ora.rac19c2.vip
      1        ONLINE  ONLINE       rac19c2                  STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac19c1                  STABLE
--------------------------------------------------------------------------------
[grid@rac19c2 ~]$ 

 

 

 

  • 1
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值