1.环境说明
操作系统:Oracle Enterprise Linux 7 64-Bit(本文为7.6版本)
数据库版本:Oracle 19CRAC集群环境
Oracle Base目录:/data/oracle
Oracle Grid目录:/data/grid/19c/grid
Oracle Home目录:/data/oracle/product/19c/db
ASM磁盘名称 |
ASM磁盘单个容量(GB) |
ASM磁盘个数 |
ASM可用容量(GB) |
DG的冗余度 |
用户与组属性 |
用途说明 |
OCRDG |
100 |
3 |
300 |
Normal |
grid:asmadmin |
用于存放数GI的OCR和Voting Disk |
DATA |
2000 |
6 |
12000 |
external |
grid:asmadmin |
用于存放数据库实例数据文件 |
ARCHC |
2000 |
1 |
2000 |
external |
grid:asmadmin |
存放归档文件等 |
注:redo日志不推荐存放在RAID5模式下,以下是ORACLE推荐的RAID模式
2.安装环境准备
1)安装包
yum install -y bc binutils-2* compat-libcap1-* compat-libstdc++*.i686 compat-libstdc++* elfutils-libelf-*.i686 elfutils-libelf-* elfutils-libelf-devel-*.el7.i686 elfutils-libelf-devel-* fontconfig-devel-* glibc-c*i686 glibc-* glibc-devel-*.i686 glibc-devel-* ksh libaio-*.i686 libaio-*.x86_64 libaio-devel-*i686 libaio-devel-*x86_64 libX11-*.i686 libX11-*.x86_64 libXau-*.el7.i686 libXau-*.x86_64 libXi-*i686 libXi-*x86_64 libXtst-*.i686 libXtst-*x86_64 libXrender-devel-*.i686 libXrender-devel-*.x86_64 libXrender-*i686 libXrender-*.x86_64 libgcc-*.i686 libgcc-*.x86_64 librdmacm-devel-*.i686 librdmacm-devel-*.x86_64 libstdc++-*.i686 libstdc++-*.x86_64 libstdc++-devel-*.i686 libstdc++-devel-*.x86_64 libxcb-*.i686 libxcb-*x86_64 make-*.x86_64 nfs-utils-*el7.x86_64 net-tools-* python-configshell-*.noarch python-rtslib-*.noarch python-six-*.noarch smartmontools*.x86_64 sysstat-*.x86_64 targetcli-*.noarch psmisc
rpm -qa | grep -E "bc|binutils-|compat-libcap1-|compat-libstdc++|elfutils-libelf-|elfutils-libelf-devel-|el7elfutils-libelf-devel-|fontconfig-devel-|glibc-c|i686glibc-|glibc-devel-|kshlibaio-|libaio-|libaio-devel-|i686libaio-devel-|libX11-|libXau-|.el7libXau-|libXi-|i686libXi-|libXtst-|libXrender-devel-|libXrender-|i686libXrender-|libgcc-|librdmacm-devel-|libstdc++-|libstdc++-devel-|libxcb-|make-|nfs-utils-|el7net-tools-|python-configshell-|python-rtslib-|python-six-|smartmontools|sysstat-|targetcli-"|sort
2)selinux禁用
vi /etc/selinux/config
修改SELINUX=disabled
3)禁用AVAHI daemon
vi /etc/sysconfig/network
NOZEROCONF=yes
# systemctl stop avahi-daemon
# systemctl disable avahi-daemon
4)关闭透明大页Transparent HugePages
vi /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rootvg/root_lv rd.lvm.lv=rootvg/swap_lv rd.lvm.lv=rootvg/usr_lv rhgb quiet transparent_hugepage=never"
# grub2-mkconfig -o /boot/grub2/grub.cfg
需重启
# grep AnonHugePages /proc/meminfo
AnonHugePages: 0 kB
# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
5)关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
6)创建用户、组
groupadd -g 1000 oinstall
groupadd -g 1001 dba
groupadd -g 1018 asmadmin
groupadd -g 1011 asmdba
groupadd -g 1012 asmoper
groupadd -g 1013 backupdba
groupadd -g 1014 kmdba
groupadd -g 1015 oper
groupadd -g 1016 dgdba
groupadd -g 1017 racdba
useradd -u 1002 -g oinstall -G oinstall,dba,oper,backupdba,dgdba,racdba,kmdba,asmdba -d /home/oracle -s /bin/bash oracle
useradd -u 1001 -g oinstall -G oinstall,dba,racdba,asmadmin,asmdba,asmoper -m -d /home/grid grid