vmware安装oracle 19c rac
操作系统配置
环境信息
#环境信息
修改hosts文件
1、添加netork文件
echo “HOSTNAME=19crac2”>>/etc/sysconfig/network
echo “NOZEROCONF=yes”>>/etc/sysconfig/network
2、编辑hosts文件
[root@19crac1 19c]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.1.11.22 19crac1
10.1.11.23 19crac2
10.1.11.27 19crac1-vip
10.1.11.28 19crac2-vip
10.1.11.29 rac19c-scan
192.168.1.22 19crac1-priv
192.168.1.23 19crac2-priv
内核参数修改
echo "fs.file-max = 6815744
kernel.sem = 10000 10240000 10000 1024
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 751619276800
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 16777216
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.wmem_default = 16777216
fs.aio-max-nr = 6194304
vm.dirty_ratio=20
vm.dirty_background_ratio=3
vm.dirty_writeback_centisecs=100
vm.dirty_expire_centisecs=500
vm.swappiness=10
vm.min_free_kbytes=524288
net.core.netdev_max_backlog = 30000
net.core.netdev_budget = 600
#vm.nr_hugepages =
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
net.ipv4.ipfrag_time = 120
net.ipv4.ipfrag_low_thresh = 41943040
net.ipv4.ipfrag_high_thresh = 40894464
net.ipv4.ipfrag_max_dist = 1024
">> /etc/sysctl.d/oracle.conf && sysctl --system
禁用 Transparent HugePages服务
vi /etc/default/grub
在GRUB_CMDLINE_LINUX添加transparent_hugepage=never
如:
[root@crm3db1 ~]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="
(
s
e
d
′
s
,
r
e
l
e
a
s
e
.
∗
(sed 's, release .*
(sed′s,release.∗,g’ /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT=“console”
-------GRUB_CMDLINE_LINUX=“crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rd.lvm.lv=rhel/usr rhgb quiet net.ifnames=0 ipv6.disable=1 biosdevname=0 transparent_hugepage=never intel_pstate=disable”
GRUB_CMDLINE_LINUX=“crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rd.lvm.lv=rhel/usr rhgb quiet transparent_hugepage=never intel_pstate=disable”
GRUB_DISABLE_RECOVERY=“true”
使其生效:
grub2-mkconfig -o /boot/grub2/grub.cfg
重启:
reboot;
查看当前Transparent hugepage状态:
cat /sys/kernel/mm/transparent_hugepage/enabled
禁用selinux
cp /etc/selinux/config /etc/selinux/config_date +"%Y%m%d_%H%M%S"
&& sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config
创建用户
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/useradd -u 502 -g oinstall -G dba oracle -m -s /bin/bash
/usr/sbin/useradd -u 501 -g oinstall -G dba grid -m -s /bin/bash
echo “oracle”|passwd oracle --stdin
echo “oracle”|passwd grid --stdin
安装软件服务
1、配置yum源
[root@19crac1 19c]# cat /etc/yum.repos.d/base.repo
[base]
name=base
baseurl=file:///mnt
enabled=1
gpgcheck=0
2、安装软件
yum install -y bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc librdmacm-devel libstdc++ libstdc+±devel libxcb make net-tools smartmontools sysstat
注意:compat-libstdc镜像里面没有,需从本地上传,rpm安装
禁用不必需要的服务
systemctl stop tuned.service ktune.service
systemctl stop firewalld.service
systemctl stop postfix.service
systemctl stop avahi-daemon.socket
systemctl stop avahi-daemon.service
systemctl stop atd.service
systemctl stop bluetooth.service
systemctl stop wpa_supplicant.service
systemctl stop accounts-daemon.service
systemctl stop atd.service cups.service
systemctl stop postfix.service
systemctl stop ModemManager.service
systemctl stop debug-shell.service
systemctl stop rtkit-daemon.service
systemctl stop rpcbind.service
systemctl stop rngd.service
systemctl stop upower.service
systemctl stop rhsmcertd.service
systemctl stop rtkit-daemon.service
systemctl stop ModemManager.service
systemctl stop mcelog.service
systemctl stop colord.service
systemctl stop gdm.service
systemctl stop libstoragemgmt.service
systemctl stop ksmtuned.service
systemctl stop brltty.service
systemctl stop avahi-dnsconfd.service
systemctl disable tuned.service ktune.service
systemctl disable firewalld.service
systemctl disable postfix.service
systemctl disable avahi-daemon.socket
systemctl disable avahi-daemon.service
systemctl disable atd.service
systemctl disable bluetooth.service
systemctl disable wpa_supplicant.service
systemctl disable accounts-daemon.service
systemctl disable atd.service cups.service
systemctl disable postfix.service
systemctl disable ModemManager.service
systemctl disable debug-shell.service
systemctl disable rtkit-daemon.service
systemctl disable rpcbind.service
systemctl disable rngd.service
systemctl disable upower.service
systemctl disable rhsmcertd.service
systemctl disable rtkit-daemon.service
systemctl disable ModemManager.service
systemctl disable mcelog.service
systemctl disable colord.service
systemctl disable gdm.service
systemctl disable libstoragemgmt.service
systemctl disable ksmtuned.service
systemctl disable brltty.service
systemctl disable avahi-dnsconfd.service
下面是时间内服务器,请确认环境中使用的那种方式
systemctl disable ntpd.service
systemctl stop ntpd.service
或者是
systemctl stop chronyd.service
systemctl disable chronyd.service
用户ulimit配置
echo "
oracle soft nproc 655350
oracle hard nproc 655350
oracle soft nofile 655360
oracle hard nofile 655360
grid soft nproc 655350
grid hard nproc 655350
grid soft nofile 655360
grid hard nofile 655360
oracle soft stack 102400
oracle hard stack 327680
grid soft stack 102400
grid hard stack 327680
oracle soft memlock -1
oracle hard memlock -1
grid soft memlock -1
grid hard memlock -1
root soft memlock -1
root hard memlock -1" >>/etc/security/limits.conf
cp /etc/profile /etc/profile_date +"%Y%m%d_%H%M%S"
echo "
if [ $USER = “oracle” ] || [ $USER = “grid” ] || [ $USER = “root” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 655350
ulimit -n 655350
else
ulimit -u 655350 -n 655350
fi
fi">>/etc/profile
sed -i ‘s/* soft nproc 4096/* soft nproc 655350/’ /etc/security/limits.d/20-nproc.conf
创建相关目录
mkdir -p /u01/app/grid
mkdir -p /u01/app/19c/grid
mkdir -p /u01/app/oracle/product/19c/dbhome_1
chown grid:oinstall /u01/app
chown grid:oinstall /u01/app/grid
chown grid:oinstall /u01/app/19c/grid
chown -R grid:oinstall /u01/app/19c/grid
chown -R oracle:oinstall /u01/app/oracle
配置环境变量
echo “export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19c/dbhome_1
export ORACLE_SID=ora19c1
export PATH=$ORACLE_HOME/bin:$PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/lib/usr/lib:/usr/local/lib
set -o vi
stty erase ^h
if [ -t 0 ]; then
stty intr ^C
fi
umask 022”>>/home/oracle/.bash_profile
echo “export PATH
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19c/grid
export ORACLE_SID=+ASM1
export PATH=$ORACLE_HOME/bin:$PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/lib/usr/lib:/usr/local/lib
set -o vi
stty erase ^h
if [ -t 0 ]; then
stty intr ^C
fi
umask 022” >>/home/grid/.bash_profile
使用udev映射磁盘
[root@19crac2 network-scripts]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name", RESULT=="36000c297317e21bab50bb1b121987702", SYMLINK+="asm_ocr1", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name", RESULT=="36000c29c3c2531bf8a6b32d5c043acbd", SYMLINK+="asm_ocr2", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name", RESULT=="36000c29918c51869b946d534f191995a", SYMLINK+="asm_ocr3", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name", RESULT=="36000c29f795c54872af1a5ae34661b43", SYMLINK+="asm_arch01", OWNER="grid", GROUP="oinstall", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$name", RESULT=="36000c29e1c3fab1ec014e3d8778b4685", SYMLINK+="asm_data01", OWNER="grid", GROUP="oinstall", MODE="0660"
注意修改result的结果,提前输出个磁盘的wwid。
重启udev
udevadm control --reload-rules
/sbin/udevadm trigger --type=devices --action=change
虚拟机配置
在虚拟机的安装路径下,用文本编辑器打开下面文件:
添加以下参数(设置共享盘):
disk.locking = “false”
diskLib.dataCacheMaxSize = “0”
diskLib.dataCacheMaxReadAheadSize = “0”
diskLib.DataCacheMinReadAheadSize = “0”
diskLib.dataCachePageSize = “4096”
diskLib.maxUnsyncedWrites = “0”
disk.EnableUUID = “TRUE”
scsi1:0.deviceType = “disk”
scsi1:1.deviceType = “disk”
scsi1:2.deviceType = “disk”
scsi1:3.deviceType = “disk”
scsi1:4.deviceType = “disk”
磁盘如果有多个,scsi这里按添加时候的号,顺序编写即可
安装GI
图形化安装
[grid@19crac1 grid]$ export DISPLAY=10.1.11.2:0.0
[grid@19crac1 grid]$ ./gridSetup.sh
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
Launching Oracle Grid Infrastructure Setup Wizard…
The response file for this session can be found at:
/u01/app/19c/grid/install/response/grid_2020-07-10_11-16-11AM.rsp
You can find the log of this install session at:
/tmp/GridSetupActions2020-07-10_11-16-11AM/gridSetupActions2020-07-10_11-16-11AM.log
执行root.sh
在1,2节点
[root@19crac1 ~]# /tmp/GridSetupActions2020-07-10_11-16-11AM/CVU_19.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.
[root@19crac2 ~]# /tmp/GridSetupActions2020-07-10_11-16-11AM/CVU_19.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.
1节点:
[root@19crac1 19c]# /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.
2节点:
[root@19crac2 19c]# /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.
1节点:
[root@19crac1 19c]# /u01/app/19c/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/19c/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/19c/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/19crac1/crsconfig/rootcrs_19crac1_2020-07-10_11-30-19AM.log
2020/07/10 11:30:26 CLSRSC-594: Executing installation step 1 of 19: ‘SetupTFA’.
2020/07/10 11:30:26 CLSRSC-594: Executing installation step 2 of 19: ‘ValidateEnv’.
2020/07/10 11:30:26 CLSRSC-363: User ignored prerequisites during installation
2020/07/10 11:30:26 CLSRSC-594: Executing installation step 3 of 19: ‘CheckFirstNode’.
2020/07/10 11:30:27 CLSRSC-594: Executing installation step 4 of 19: ‘GenSiteGUIDs’.
2020/07/10 11:30:28 CLSRSC-594: Executing installation step 5 of 19: ‘SetupOSD’.
2020/07/10 11:30:28 CLSRSC-594: Executing installation step 6 of 19: ‘CheckCRSConfig’.
2020/07/10 11:30:28 CLSRSC-594: Executing installation step 7 of 19: ‘SetupLocalGPNP’.
2020/07/10 11:30:49 CLSRSC-594: Executing installation step 8 of 19: ‘CreateRootCert’.
2020/07/10 11:30:53 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/07/10 11:30:54 CLSRSC-594: Executing installation step 9 of 19: ‘ConfigOLR’.
2020/07/10 11:31:06 CLSRSC-594: Executing installation step 10 of 19: ‘ConfigCHMOS’.
2020/07/10 11:31:06 CLSRSC-594: Executing installation step 11 of 19: ‘CreateOHASD’.
2020/07/10 11:31:10 CLSRSC-594: Executing installation step 12 of 19: ‘ConfigOHASD’.
2020/07/10 11:31:10 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.service’
2020/07/10 11:31:48 CLSRSC-594: Executing installation step 13 of 19: ‘InstallAFD’.
2020/07/10 11:31:52 CLSRSC-594: Executing installation step 14 of 19: ‘InstallACFS’.
2020/07/10 11:32:36 CLSRSC-594: Executing installation step 15 of 19: ‘InstallKA’.
2020/07/10 11:32:41 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-200710AM113312.log for details.
2020/07/10 11:34:04 CLSRSC-482: Running command: ‘/u01/app/19c/grid/bin/ocrconfig -upgrade grid oinstall’
CRS-4256: Updating the profile
Successful addition of voting disk c9472c9d09d34f76bfa060b0678150c1.
Successful addition of voting disk b00f995b5b474f3dbf620d8834ccbf0b.
Successful addition of voting disk f26b0de438db4f68bfba6af4badf43ca.
Successfully replaced voting disk group with +ocrdg.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##STATE File Universal Id File Name Disk group
- ONLINE c9472c9d09d34f76bfa060b0678150c1 (/dev/sdb) [OCRDG]
- ONLINE b00f995b5b474f3dbf620d8834ccbf0b (/dev/sdc) [OCRDG]
- ONLINE f26b0de438db4f68bfba6af4badf43ca (/dev/sdd) [OCRDG]
Located 3 voting disk(s).
2020/07/10 11:35:28 CLSRSC-594: Executing installation step 17 of 19: ‘StartCluster’.
2020/07/10 11:36:35 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/07/10 11:36:35 CLSRSC-594: Executing installation step 18 of 19: ‘ConfigNode’.
2020/07/10 11:37:46 CLSRSC-594: Executing installation step 19 of 19: ‘PostConfig’.
2020/07/10 11:38:11 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster … succeeded
如果此处有报错,可以具体查看日志:/u01/app/grid/crsdata/19crac1/crsconfig/rootcrs_19crac1_2020-07-10_11-30-19AM.log。这是root.sh脚本执行的后台日志,里面会有具体报错。然后进行相应解决
2节点:
[root@19crac2 19c]# /u01/app/19c/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/19c/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/19c/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/19crac2/crsconfig/rootcrs_19crac2_2020-07-10_11-38-42AM.log
2020/07/10 11:38:45 CLSRSC-594: Executing installation step 1 of 19: ‘SetupTFA’.
2020/07/10 11:38:45 CLSRSC-594: Executing installation step 2 of 19: ‘ValidateEnv’.
2020/07/10 11:38:45 CLSRSC-363: User ignored prerequisites during installation
2020/07/10 11:38:45 CLSRSC-594: Executing installation step 3 of 19: ‘CheckFirstNode’.
2020/07/10 11:38:46 CLSRSC-594: Executing installation step 4 of 19: ‘GenSiteGUIDs’.
2020/07/10 11:38:46 CLSRSC-594: Executing installation step 5 of 19: ‘SetupOSD’.
2020/07/10 11:38:47 CLSRSC-594: Executing installation step 6 of 19: ‘CheckCRSConfig’.
2020/07/10 11:38:47 CLSRSC-594: Executing installation step 7 of 19: ‘SetupLocalGPNP’.
2020/07/10 11:38:48 CLSRSC-594: Executing installation step 8 of 19: ‘CreateRootCert’.
2020/07/10 11:38:48 CLSRSC-594: Executing installation step 9 of 19: ‘ConfigOLR’.
2020/07/10 11:38:56 CLSRSC-594: Executing installation step 10 of 19: ‘ConfigCHMOS’.
2020/07/10 11:38:56 CLSRSC-594: Executing installation step 11 of 19: ‘CreateOHASD’.
2020/07/10 11:38:57 CLSRSC-594: Executing installation step 12 of 19: ‘ConfigOHASD’.
2020/07/10 11:38:58 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.service’
2020/07/10 11:39:09 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/07/10 11:39:33 CLSRSC-594: Executing installation step 13 of 19: ‘InstallAFD’.
2020/07/10 11:39:34 CLSRSC-594: Executing installation step 14 of 19: ‘InstallACFS’.
2020/07/10 11:40:12 CLSRSC-594: Executing installation step 15 of 19: ‘InstallKA’.
2020/07/10 11:40:13 CLSRSC-594: Executing installation step 16 of 19: ‘InitConfig’.
2020/07/10 11:40:22 CLSRSC-594: Executing installation step 17 of 19: ‘StartCluster’.
2020/07/10 11:41:09 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/07/10 11:41:09 CLSRSC-594: Executing installation step 18 of 19: ‘ConfigNode’.
2020/07/10 11:41:25 CLSRSC-594: Executing installation step 19 of 19: ‘PostConfig’.
2020/07/10 11:41:32 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster … succeeded
安装完成,可以查看下GI的状态
[grid@19crac1 grid]$ crsctl stat res -t
Name Target State Server State details
Local Resources
ora.LISTENER.lsnr
ONLINE ONLINE 19crac1 STABLE
ONLINE ONLINE 19crac2 STABLE
ora.chad
ONLINE ONLINE 19crac1 STABLE
ONLINE ONLINE 19crac2 STABLE
ora.net1.network
ONLINE ONLINE 19crac1 STABLE
ONLINE ONLINE 19crac2 STABLE
ora.ons
ONLINE ONLINE 19crac1 STABLE
ONLINE ONLINE 19crac2 STABLE
ora.proxy_advm
OFFLINE OFFLINE 19crac1 STABLE
OFFLINE OFFLINE 19crac2 STABLE
Cluster Resources
ora.19crac1.vip
1 ONLINE ONLINE 19crac1 STABLE
ora.19crac2.vip
1 ONLINE ONLINE 19crac2 STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE 19crac1 STABLE
2 ONLINE ONLINE 19crac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE 19crac1 STABLE
ora.OCRDG.dg(ora.asmgroup)
1 ONLINE ONLINE 19crac1 STABLE
2 ONLINE ONLINE 19crac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE 19crac1 Started,STABLE
2 ONLINE ONLINE 19crac2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE 19crac1 STABLE
2 ONLINE ONLINE 19crac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE 19crac1 STABLE
ora.qosmserver
1 ONLINE ONLINE 19crac1 STABLE
ora.scan1.vip
1 ONLINE ONLINE 19crac1 STABLE
asmca创建磁盘组
[grid@19crac1 grid]$ asmca
查看集群资源:
[grid@19crac1 grid]$ srvctl modify asm -count ALL
[grid@19crac1 grid]$ crsctl stat res -t
Name Target State Server State details
Local Resources
ora.LISTENER.lsnr
ONLINE ONLINE 19crac1 STABLE
ONLINE ONLINE 19crac2 STABLE
ora.chad
ONLINE ONLINE 19crac1 STABLE
ONLINE ONLINE 19crac2 STABLE
ora.net1.network
ONLINE ONLINE 19crac1 STABLE
ONLINE ONLINE 19crac2 STABLE
ora.ons
ONLINE ONLINE 19crac1 STABLE
ONLINE ONLINE 19crac2 STABLE
ora.proxy_advm
OFFLINE OFFLINE 19crac1 STABLE
OFFLINE OFFLINE 19crac2 STABLE
Cluster Resources
ora.19crac1.vip
1 ONLINE ONLINE 19crac1 STABLE
ora.19crac2.vip
1 ONLINE ONLINE 19crac2 STABLE
ora.ARCHDG.dg(ora.asmgroup)
1 ONLINE ONLINE 19crac1 STABLE
2 ONLINE ONLINE 19crac2 STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE 19crac1 STABLE
2 ONLINE ONLINE 19crac2 STABLE
ora.DATADG.dg(ora.asmgroup)
1 ONLINE ONLINE 19crac1 STABLE
2 ONLINE ONLINE 19crac2 STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE 19crac1 STABLE
ora.OCRDG.dg(ora.asmgroup)
1 ONLINE ONLINE 19crac1 STABLE
2 ONLINE ONLINE 19crac2 STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE 19crac1 Started,STABLE
2 ONLINE ONLINE 19crac2 Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE 19crac1 STABLE
2 ONLINE ONLINE 19crac2 STABLE
ora.cvu
1 ONLINE ONLINE 19crac1 STABLE
ora.qosmserver
1 ONLINE ONLINE 19crac1 STABLE
ora.scan1.vip
1 ONLINE ONLINE 19crac1 STABLE
安装数据库软件
上传软件,修改权限
[root@19crac1 soft]# chown oracle:oinstall V982063-01.zip
[root@19crac1 soft]# chmod 755 V982063-01.zip
[root@19crac1 soft]# su - oracle
Last login: Fri Jul 10 12:40:45 CST 2020 on pts/0
[oracle@19crac1 dbhome_1]$ unzip V982063-01.zip -d $ORACLE_HOME
启动安装图形化
[oracle@19crac1 ~]$ cd
O
R
A
C
L
E
H
O
M
E
[
o
r
a
c
l
e
@
19
c
r
a
c
1
d
b
h
o
m
e
1
]
ORACLE_HOME [oracle@19crac1 dbhome_1]
ORACLEHOME[oracle@19crac1dbhome1] ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
[oracle@19crac1 dbhome_1]$ export DISPLAY=10.1.11.2:0.0
[oracle@19crac1 dbhome_1]$ ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
Launching Oracle Database Setup Wizard…
step1:此处选择仅安装数据库软件,后面我们再创建数据库
step2:选择安装oracle rac
step3:选择所有待安装节点。注意,点击 select all。
先配置等效性,输入密码,然后点击setup
正在配置等效性
配置成功
如果此处报错,可以选择手动配置等效性,并测试。
step 4:选择企业版
step 5:选择oracle_base,默认取用户得环境变量
step6:选择组
step7:此处不选择集群安装完成后,自动执行root.sh脚本。
step8:
点击OK,他就会重新再校验一次
防火墙打开,关闭后,这一步恢复正常
执行root.sh
[root@19crac1 19c]# /u01/app/oracle/product/19c/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/19c/dbhome_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.
节点2:
[root@19crac2 19c]# /u01/app/oracle/product/19c/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/19c/dbhome_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.
dbca建库
"ORA-17502 /ORA-01017: invalid username/password; logon denied " While Creating 19c Database (Doc ID 2545858.1)
建库后配置
1、修改数据库参数
2、修改监听配置
3、修改redo大小和组
4、修改定时任务
安装补丁
替换opatch
1、oracle用户的
[root@19crac1 soft]# cd /u01/soft/
[root@19crac1 soft]# ll
total 2654720
-rw-r–r-- 1 root root 2606745994 Jul 10 10:56 p30783556_190000_Linux-x86-64.zip
-rw-r–r-- 1 root root 111682884 Aug 4 2019 p6880880_190000_Linux-x86-64.zip
[root@19crac1 soft]# chown oracle:oinstall p6880880_190000_Linux-x86-64.zip
[root@19crac1 soft]# chmod 755 p6880880_190000_Linux-x86-64.zip
[root@19crac1 soft]# su - oracle
Last login: Fri Jul 10 12:52:16 CST 2020
[oracle@19crac1 ~]$ cd
O
R
A
C
L
E
H
O
M
E
[
o
r
a
c
l
e
@
19
c
r
a
c
1
d
b
h
o
m
e
1
]
ORACLE_HOME [oracle@19crac1 dbhome_1]
ORACLEHOME[oracle@19crac1dbhome1] rm -rf OPatch/
[oracle@19crac1 dbhome_1]$ unip /u01/soft/p6880880_190000_Linux-x86-64.zip -d .
-bash: unip: command not found
[oracle@19crac1 dbhome_1]$ unzip /u01/soft/p6880880_190000_Linux-x86-64.zip -d .
Archive: /u01/soft/p6880880_190000_Linux-x86-64.zip
2、grid用户的
[root@19crac1 soft]# cd /u01/soft/
[root@19crac1 soft]# chown grid:oinstall p6880880_190000_Linux-x86-64.zip
[root@19crac1 soft]# su - grid
Last login: Fri Jul 10 14:08:31 CST 2020
[grid@19crac1 ~]$ cd
O
R
A
C
L
E
H
O
M
E
[
g
r
i
d
@
19
c
r
a
c
1
g
r
i
d
]
ORACLE_HOME [grid@19crac1 grid]
ORACLEHOME[grid@19crac1grid] rm -rf OPatch/
rm: cannot remove Patch/ Permission denied
[grid@19crac1 grid]$ logout
[root@19crac1 soft]# cd /u01/app/19c/grid/
[root@19crac1 grid]# rm -rf OPatch/
[root@19crac1 grid]# pwd
/u01/app/19c/grid
[root@19crac1 grid]# unzip /u01/soft/p6880880_190000_Linux-x86-64.zip -d .
[root@19crac1 grid]# chown -R grid:oinstall OPatch/
[root@19crac1 grid]# chmod -R 755 OPatch/
再另一个节点执行上述步骤。
[root@19crac1 soft]# unzip p30783556_190000_Linux-x86-64.zip
[root@19crac1 soft]# chown grid:oinstall -R 30783556/
[root@19crac1 soft]# chmod -R 777 30783556/