一、操作系统信息
1.系统版本(最小化安装)[root@yeshuo ~]# cat etc/redhat-releaseRed Hat Enterprise Linux Server release 7.5 (Maipo)2.内核信息[root@yeshuo ~]# uname -r3.10.0-862.el7.x86_643.磁盘规划[root@yeshuo ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/rhel-root 58G 1000M 57G 2%devtmpfs 3.9G 0 3.9G 0% devtmpfs 3.9G 0 3.9G 0% dev/shmtmpfs 3.9G 8.6M 3.9G 1% runtmpfs 3.9G 0 3.9G 0% sys/fs/cgroup/dev/sda1 1014M 130M 885M 13% boottmpfs 799M 0 799M 0% run/user/04.内存信息[root@yeshuo ~]# free -gtotal used free shared buff/cache availableMem: 7 0 7 0 0 7Swap: 4 0 45.CPU信息[root@yeshuo ~]# lscpu |grep CPUCPU op-mode(s): 32-bit, 64-bitCPU(s): 1On-line CPU(s) list: 0CPU family: 6Model name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHzCPU MHz: 1799.998NUMA node0 CPU(s): 0
二、创建用户和用户组
[root@yeshuo ~]# usr/sbin/groupadd -g 54321 oinstall[root@yeshuo ~]# usr/sbin/groupadd -g 54322 dba[root@yeshuo ~]# usr/sbin/groupadd -g 54323 oper[root@yeshuo ~]# usr/sbin/groupadd -g 54324 backupdba[root@yeshuo ~]# usr/sbin/groupadd -g 54325 dgdba[root@yeshuo ~]# usr/sbin/groupadd -g 54326 kmdba[root@yeshuo ~]# usr/sbin/groupadd -g 54327 asmdba[root@yeshuo ~]# usr/sbin/groupadd -g 54328 asmoper[root@yeshuo ~]# usr/sbin/groupadd -g 54329 asmadmin[root@yeshuo ~]# usr/sbin/groupadd -g 54330 racdba[root@yeshuo ~]# usr/sbin/useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle[root@yeshuo ~]# usr/sbin/useradd -u 54322 -g oinstall -G asmadmin,asmdba,racdba,asmoper grid[root@yeshuo ~]# echo oracle | passwd --stdin oracleChanging password for user oracle.passwd: all authentication tokens updated successfully.[root@yeshuo ~]# echo oracle | passwd --stdin gridChanging password for user grid.passwd: all authentication tokens updated successfully.
三、创建操作系统目录
[root@yeshuo ~]# mkdir -p oracle/app/grid[root@yeshuo ~]# mkdir -p oracle/app/19.3.0/grid[root@yeshuo ~]# chown -R grid:oinstall oracle[root@yeshuo ~]# chmod -R 775 oracle[root@yeshuo ~]# mkdir -p oracle/app/oracle/product/19.3.0/db_1[root@yeshuo ~]# chown -R oracle:oinstall /oracle/app/oracle
四、GRID和ORACLE用户添加环境变量
1.GRID用户添加环境变量如下:[grid@yeshuo ~]$ vi .bash_profile[grid@yeshuo ~]$ cat .bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/.local/bin:$HOME/binexport PATH######add by oracle######export TMP=/tmpexport TMPDIR=$TMPexport ORACLE_SID=+ASMexport ORACLE_BASE=/oracle/app/gridexport ORACLE_HOME=/oracle/app/19.3.0/gridexport ORACLE_TERM=xtermexport NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'export TNS_ADMIN=$ORACLE_HOME/network/adminexport PATH=$ORACLE_HOME/bin:$PATH:/usr/sbinexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport EDITOR=viexport LANG=en_USexport NLS_LANG=american_america.ZHS16GBKumask 022######add by oracle######[grid@yeshuo ~]$ source .bash_profile[grid@yeshuo ~]$ echo $ORACLE_SID+ASM[grid@yeshuo ~]$ echo $ORACLE_HOME/oracle/app/19.3.0/grid2.ORACLE用户添加环境变量如下:[oracle@yeshuo ~]$ vi .bash_profile[oracle@yeshuo ~]$ cat .bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/.local/bin:$HOME/binexport PATH######add by oracle######export TMP=/tmpexport TMPDIR=$TMPexport ORACLE_HOSTNAME=yeshuoexport ORACLE_SID=yeshuoexport ORACLE_BASE=/oracle/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1export TNS_ADMIN=$ORACLE_HOME/network/adminexport ORACLE_TERM=xtermexport PATH=$ORACLE_HOME/bin:$PATH:/usr/sbinexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport EDITOR=viexport LANG=en_USexport NLS_LANG=american_america.ZHS16GBKexport NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'umask 022######add by oracle######[oracle@yeshuo ~]$ source .bash_profile[oracle@yeshuo ~]$ echo $ORACLE_SIDyeshuo[oracle@yeshuo ~]$ echo $ORACLE_HOME/oracle/app/oracle/product/19.3.0/db_1
五、禁用NUMA和透明大页
说明:在GRUB_CMDLINE_LINUX行添加:numa=off和transparent_hugepage=never[root@yeshuo ~]# vi /etc/default/grub[root@yeshuo ~]# cat etc/default/grubGRUB_TIMEOUT=5GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' etc/system-release)"GRUB_DEFAULT=savedGRUB_DISABLE_SUBMENU=trueGRUB_TERMINAL_OUTPUT="console"GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never"GRUB_DISABLE_RECOVERY="true"重新生成grub配置文件[root@yeshuo ~]# grub2-mkconfig -o etc/grub2.cfgGenerating grub configuration file ...Found linux image: boot/vmlinuz-3.10.0-862.el7.x86_64Found initrd image: boot/initramfs-3.10.0-862.el7.x86_64.imgFound linux image: boot/vmlinuz-0-rescue-b73300e2fcb08b43b69abca893877604Found initrd image: boot/initramfs-0-rescue-b73300e2fcb08b43b69abca893877604.imgdone重启生效(安装过程中还会有其他需要重启需求的话,可以最后一起重启,避免多次重启)[root@yeshuo ~]# reboot检查是否禁用NUMA和透明大页[root@yeshuo ~]# dmesg | grep -i numa[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.10.0-862.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never[ 0.000000] NUMA turned off[ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-862.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never[root@yeshuo ~]# grep AnonHugePages proc/meminfoAnonHugePages: 0 kB
六、禁用SELINUX和关闭防火墙
1.需要重启生效[root@yeshuo ~]# cat /etc/selinux/config |grep -v '#'SELINUX=disabledSELINUXTYPE=targeted2.不重启生效(临时生效,重启后不再生效)[root@yeshuo ~]# setenforce 03.关闭防火墙[root@yeshuo ~]# systemctl stop firewalld[root@yeshuo ~]# systemctl disable firewalldRemoved symlink etc/systemd/system/multi-user.target.wants/firewalld.service.Removed symlink etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.[root@yeshuo ~]# systemctl status firewalld● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)Active: inactive (dead)Docs: man:firewalld(1)Sep 19 14:33:21 yeshuo systemd[1]: Starting firewalld - dynamic firewall daemon...Sep 19 14:33:22 yeshuo systemd[1]: Started firewalld - dynamic firewall daemon.Sep 19 14:49:52 yeshuo systemd[1]: Stopping firewalld - dynamic firewall daemon...Sep 19 14:49:53 yeshuo systemd[1]: Stopped firewalld - dynamic firewall daemon.
七、修改内核参数
[root@yeshuo ~]# cat >>/etc/sysctl.conf << EOF> fs.aio-max-nr = 1048576> fs.file-max = 6815744> kernel.shmall = 2684354560> kernel.shmmax = 549755813760> kernel.shmmni = 4096> kernel.sem = 250 32000 100 128> kernel.panic_on_oops = 1> 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> net.ipv4.conf.all.rp_filter = 2> net.ipv4.conf.default.rp_filter = 2> EOFsysctl -p使内核参数生效[root@yeshuo ~]# sysctl -pfs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2684354560kernel.shmmax = 549755813760kernel.shmmni = 4096kernel.sem = 250 32000 100 128kernel.panic_on_oops = 1net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576net.ipv4.conf.all.rp_filter = 2net.ipv4.conf.default.rp_filter = 2
八、修改GRID和ORACLE用户资源限制
[root@yeshuo ~]# cat >>/etc/security/limits.conf <<EOF> oracle soft nproc 2047> oracle hard nproc 16384> oracle soft nofile 1024> oracle hard nofile 65536> oracle soft stack 10240> oracle hard stack 32768> grid soft nproc 2047> grid hard nproc 16384> grid soft nofile 1024> grid hard nofile 65536> grid soft stack 10240> grid hard stack 32768> EOF[root@yeshuo ~]#
九、修改HOST文件
[root@yeshuo ~]# cat etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6######DB host######192.168.171.10 yeshuo
十、修改FSTAB文件
[root@yeshuo ~]# cat >>/etc/fstab <<EOF> tmpfs dev/shm tmpfs defaults,size=10G 0 0> EOF[root@yeshuo ~]# mount -a[root@yeshuo ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/rhel-root 58G 1001M 57G 2%devtmpfs 3.9G 0 3.9G 0% devtmpfs 3.9G 0 3.9G 0% dev/shmtmpfs 3.9G 8.6M 3.9G 1% runtmpfs 3.9G 0 3.9G 0% sys/fs/cgroup/dev/sda1 1014M 130M 885M 13% boottmpfs 799M 0 799M 0% run/user/0[root@yeshuo ~]# umount dev/shm[root@yeshuo ~]# mount -a[root@yeshuo ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/rhel-root 58G 1001M 57G 2%devtmpfs 3.9G 0 3.9G 0% devtmpfs 3.9G 8.6M 3.9G 1% runtmpfs 3.9G 0 3.9G 0% sys/fs/cgroup/dev/sda1 1014M 130M 885M 13% boottmpfs 799M 0 799M 0% run/user/0tmpfs 10G 0 10G 0% /dev/shm
十一、修改NETWORK文件
[root@yeshuo ~]# cat >>/etc/sysconfig/network <<EOF> NOZEROCONF=yes> EOF[root@yeshuo ~]# cat etc/sysconfig/network# Created by anacondaNOZEROCONF=yes
十二、修改LOGIN文件
[root@yeshuo ~]# cat >>/etc/pam.d/login <<EOF> session required pam_limits.so> EOF[root@yeshuo ~]# cat etc/pam.d/login |grep pam_limitssession required pam_limits.so
十三、配置YUM源
[root@yeshuo yum.repos.d]# cat >>/etc/yum.repos.d/oracle.repo <<EOF> [rhel]> name=rhel> baseurl=file:///mnt/cdrom> gpgcheck=0> enabled=1> EOF[root@yeshuo yum.repos.d]# cat etc/yum.repos.d/oracle.repo[rhel]name=rhelbaseurl=file:///mnt/cdromgpgcheck=0enabled=1[root@yeshuo yum.repos.d]# mkdir -p /mnt/cdrom[root@yeshuo yum.repos.d]# mount -o loop root/rhel-server-7.5-x86_64-dvd.iso mnt/cdrom/mount: dev/loop0 is write-protected, mounting read-only[root@yeshuo yum.repos.d]# df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/rhel-root 58G 5.3G 53G 10%devtmpfs 3.9G 0 3.9G 0% devtmpfs 3.9G 8.7M 3.9G 1% runtmpfs 3.9G 0 3.9G 0% sys/fs/cgroup/dev/sda1 1014M 130M 885M 13% boottmpfs 799M 0 799M 0% run/user/0tmpfs 10G 0 10G 0% dev/shm/dev/loop0 4.4G 4.4G 0 100% /mnt/cdrom
十四、安装以下RPM包
[root@yeshuo ~]# yum install -y ksh[root@yeshuo ~]# yum install -y compat-libcap1[root@yeshuo ~]# yum install -y libstdc++-devel[root@yeshuo ~]# yum install -y gcc-c++说明:glibc-devel是gcc-c++的依赖包,所以上一条语句已包含安装[root@yeshuo ~]# yum install -y libaio-devel[root@yeshuo rpm]# yum install -y sysstat[root@yeshuo rpm]# yum install -y nfs-utils[root@yeshuo rpm]# yum install -y net-tools[root@yeshuo rpm]# yum install -y libxcb[root@yeshuo rpm]# yum install -y libX11[root@yeshuo rpm]# yum install -y libXau[root@yeshuo rpm]# yum install -y libXi[root@yeshuo rpm]# yum install -y libXtst[root@yeshuo ~]# yum install -y device-mapper-multipath[root@yeshuo ~]# rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpmwarning: compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEYPreparing... ################################# [100%]Updating installing...1:compat-libstdc++-33-3.2.3-72.el7 ################################# [100%][root@yeshuo ~]# yum install -y zip[root@yeshuo ~]# yum install -y unzip[root@yeshuo rpm]# yum install -y smartmontools ###安装CVU包需要
十五、上传GI和DB软件并解压
[root@yeshuo ~]# mv LINUX.X64_193000_grid_home.zip /home/grid/[root@yeshuo ~]# chown grid:oinstall home/grid/LINUX.X64_193000_grid_home.zip[root@yeshuo ~]# mv LINUX.X64_193000_db_home.zip home/oracle/[root@yeshuo ~]# chown oracle:oinstall home/oracle/LINUX.X64_193000_db_home.zip[grid@yeshuo ~]$ unzip LINUX.X64_193000_grid_home.zip -d $ORACLE_HOME安装CVU rpm包[root@yeshuo rpm]# pwd/oracle/app/19.3.0/grid/cv/rpm[root@yeshuo rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpmPreparing... ################################# [100%]Using default group oinstall to install packageUpdating installing...1:cvuqdisk-1.0.10-1 ################################# [100%]删除resolv.conf文件[root@yeshuo rpm]# rm -rf etc/resolv.conf
十六、扩容SWAP空间
说明:安装最低需求需要超过8G,此处添加10G磁盘作为swap空间。Verifying Swap Size ...FAILEDyeshuo: PRVF-7573 : Sufficient swap size is not available on node "yeshuo"[Required = 7.7961GB (8174788.0KB) ; Found = 5GB (5242876.0KB)][root@yeshuo ~]# fdisk dev/sdb[root@yeshuo ~]# mkswap dev/sdb1Setting up swapspace version 1, size = 10484732 KiBno label, UUID=e83483dc-242d-4d49-be01-4a263c34c81f[root@yeshuo ~]# cat >>/etc/fstab <<EOF> dev/sdb1 swap swap defaults 0 0> EOF[root@yeshuo ~]# swapon dev/sdb1[root@yeshuo ~]# free -gtotal used free shared buff/cache availableMem: 7 0 7 0 0 7Swap: 14 0 14
十七、屏蔽RemoveIPC参数
[root@yeshuo ~]# cat >>/etc/systemd/logind.conf <<EOF> RemoveIPC=no> EOF[root@yeshuo ~]# cat etc/systemd/logind.conf |grep RemoveIPC#RemoveIPC=noRemoveIPC=no
十八、预检查如下
[grid@yeshuo ~]$ cd oracle/app/19.3.0/grid/[grid@yeshuo grid]$ ./runcluvfy.sh stage -pre crsinst -n yeshuo -fixup -verboseVerifying Physical Memory ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo 7.7961GB (8174788.0KB) 8GB (8388608.0KB) passedVerifying Physical Memory ...PASSEDVerifying Available Physical Memory ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo 7.4683GB (7831040.0KB) 50MB (51200.0KB) passedVerifying Available Physical Memory ...PASSEDVerifying Swap Size ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo 14.999GB (1.5727608E7KB) 7.7961GB (8174788.0KB) passedVerifying Swap Size ...PASSEDVerifying Free Space: yeshuo:/usr,yeshuo:/var,yeshuo:/etc,yeshuo:/sbin,yeshuo:/tmp ...Path Node Name Mount point Available Required Status---------------- ------------ ------------ ------------ ------------ ------------usr yeshuo 48.6758GB 25MB passedvar yeshuo 48.6758GB 5MB passedetc yeshuo 48.6758GB 25MB passedsbin yeshuo 48.6758GB 10MB passed/tmp yeshuo / 48.6758GB 1GB passedVerifying Free Space: yeshuo:/usr,yeshuo:/var,yeshuo:/etc,yeshuo:/sbin,yeshuo:/tmp ...PASSEDVerifying User Existence: grid ...Node Name Status Comment------------ ------------------------ ------------------------yeshuo passed exists(54322)Verifying Users With Same UID: 54322 ...PASSEDVerifying User Existence: grid ...PASSEDVerifying Group Existence: asmadmin ...Node Name Status Comment------------ ------------------------ ------------------------yeshuo passed existsVerifying Group Existence: asmadmin ...PASSEDVerifying Group Existence: asmdba ...Node Name Status Comment------------ ------------------------ ------------------------yeshuo passed existsVerifying Group Existence: asmdba ...PASSEDVerifying Group Existence: oinstall ...Node Name Status Comment------------ ------------------------ ------------------------yeshuo passed existsVerifying Group Existence: oinstall ...PASSEDVerifying Group Membership: asmdba ...Node Name User Exists Group Exists User in Group Status---------------- ------------ ------------ ------------ ----------------yeshuo yes yes yes passedVerifying Group Membership: asmdba ...PASSEDVerifying Group Membership: asmadmin ...Node Name User Exists Group Exists User in Group Status---------------- ------------ ------------ ------------ ----------------yeshuo yes yes yes passedVerifying Group Membership: asmadmin ...PASSEDVerifying Group Membership: oinstall(Primary) ...Node Name User Exists Group Exists User in Group Primary Status---------------- ------------ ------------ ------------ ------------ ------------yeshuo yes yes yes yes passedVerifying Group Membership: oinstall(Primary) ...PASSEDVerifying Run Level ...Node Name run level Required Status------------ ------------------------ ------------------------ ----------yeshuo 3 3,5 passedVerifying Run Level ...PASSEDVerifying Architecture ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo x86_64 x86_64 passedVerifying Architecture ...PASSEDVerifying OS Kernel Version ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo 3.10.0-862.el7.x86_64 3.10.0 passedVerifying OS Kernel Version ...PASSEDVerifying OS Kernel Parameter: semmsl ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 250 250 250 passedVerifying OS Kernel Parameter: semmsl ...PASSEDVerifying OS Kernel Parameter: semmns ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 32000 32000 32000 passedVerifying OS Kernel Parameter: semmns ...PASSEDVerifying OS Kernel Parameter: semopm ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 100 100 100 passedVerifying OS Kernel Parameter: semopm ...PASSEDVerifying OS Kernel Parameter: semmni ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 128 128 128 passedVerifying OS Kernel Parameter: semmni ...PASSEDVerifying OS Kernel Parameter: shmmax ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 549755813760 549755813760 4185491456 passedVerifying OS Kernel Parameter: shmmax ...PASSEDVerifying OS Kernel Parameter: shmmni ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 4096 4096 4096 passedVerifying OS Kernel Parameter: shmmni ...PASSEDVerifying OS Kernel Parameter: shmall ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 2684354560 2684354560 134217727 passedVerifying OS Kernel Parameter: shmall ...PASSEDVerifying OS Kernel Parameter: file-max ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 6815744 6815744 6815744 passedVerifying OS Kernel Parameter: file-max ...PASSEDVerifying OS Kernel Parameter: ip_local_port_range ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo between 9000 & 65500 between 9000 & 65500 between 9000 & 65535 passedVerifying OS Kernel Parameter: ip_local_port_range ...PASSEDVerifying OS Kernel Parameter: rmem_default ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 262144 262144 262144 passedVerifying OS Kernel Parameter: rmem_default ...PASSEDVerifying OS Kernel Parameter: rmem_max ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 4194304 4194304 4194304 passedVerifying OS Kernel Parameter: rmem_max ...PASSEDVerifying OS Kernel Parameter: wmem_default ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 262144 262144 262144 passedVerifying OS Kernel Parameter: wmem_default ...PASSEDVerifying OS Kernel Parameter: wmem_max ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 1048576 1048576 1048576 passedVerifying OS Kernel Parameter: wmem_max ...PASSEDVerifying OS Kernel Parameter: aio-max-nr ...Node Name Current Configured Required Status Comment---------------- ------------ ------------ ------------ ------------ ------------yeshuo 1048576 1048576 1048576 passedVerifying OS Kernel Parameter: aio-max-nr ...PASSEDVerifying Package: kmod-20-21 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo kmod(x86_64)-20-21.el7 kmod(x86_64)-20-21 passedVerifying Package: kmod-20-21 (x86_64) ...PASSEDVerifying Package: kmod-libs-20-21 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo kmod-libs(x86_64)-20-21.el7 kmod-libs(x86_64)-20-21 passedVerifying Package: kmod-libs-20-21 (x86_64) ...PASSEDVerifying Package: binutils-2.23.52.0.1 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo binutils-2.27-27.base.el7 binutils-2.23.52.0.1 passedVerifying Package: binutils-2.23.52.0.1 ...PASSEDVerifying Package: compat-libcap1-1.10 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo compat-libcap1-1.10-7.el7 compat-libcap1-1.10 passedVerifying Package: compat-libcap1-1.10 ...PASSEDVerifying Package: libgcc-4.8.2 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libgcc(x86_64)-4.8.5-28.el7 libgcc(x86_64)-4.8.2 passedVerifying Package: libgcc-4.8.2 (x86_64) ...PASSEDVerifying Package: libstdc++-4.8.2 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libstdc++(x86_64)-4.8.5-28.el7 libstdc++(x86_64)-4.8.2 passedVerifying Package: libstdc++-4.8.2 (x86_64) ...PASSEDVerifying Package: libstdc++-devel-4.8.2 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libstdc++-devel(x86_64)-4.8.5-28.el7 libstdc++-devel(x86_64)-4.8.2 passedVerifying Package: libstdc++-devel-4.8.2 (x86_64) ...PASSEDVerifying Package: sysstat-10.1.5 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo sysstat-10.1.5-13.el7 sysstat-10.1.5 passedVerifying Package: sysstat-10.1.5 ...PASSEDVerifying Package: gcc-c++-4.8.2 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo gcc-c++-4.8.5-28.el7 gcc-c++-4.8.2 passedVerifying Package: gcc-c++-4.8.2 ...PASSEDVerifying Package: ksh ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo ksh ksh passedVerifying Package: ksh ...PASSEDVerifying Package: make-3.82 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo make-3.82-23.el7 make-3.82 passedVerifying Package: make-3.82 ...PASSEDVerifying Package: glibc-2.17 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo glibc(x86_64)-2.17-222.el7 glibc(x86_64)-2.17 passedVerifying Package: glibc-2.17 (x86_64) ...PASSEDVerifying Package: glibc-devel-2.17 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo glibc-devel(x86_64)-2.17-222.el7 glibc-devel(x86_64)-2.17 passedVerifying Package: glibc-devel-2.17 (x86_64) ...PASSEDVerifying Package: libaio-0.3.109 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libaio(x86_64)-0.3.109-13.el7 libaio(x86_64)-0.3.109 passedVerifying Package: libaio-0.3.109 (x86_64) ...PASSEDVerifying Package: libaio-devel-0.3.109 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libaio-devel(x86_64)-0.3.109-13.el7 libaio-devel(x86_64)-0.3.109 passedVerifying Package: libaio-devel-0.3.109 (x86_64) ...PASSEDVerifying Package: nfs-utils-1.2.3-15 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo nfs-utils-1.3.0-0.54.el7 nfs-utils-1.2.3-15 passedVerifying Package: nfs-utils-1.2.3-15 ...PASSEDVerifying Package: smartmontools-6.2-4 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo smartmontools-6.5-1.el7 smartmontools-6.2-4 passedVerifying Package: smartmontools-6.2-4 ...PASSEDVerifying Package: net-tools-2.0-0.17 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo net-tools-2.0-0.22.20131004git.el7 net-tools-2.0-0.17 passedVerifying Package: net-tools-2.0-0.17 ...PASSEDVerifying Package: compat-libstdc++-33-3.2.3 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo compat-libstdc++-33(x86_64)-3.2.3-72.el7 compat-libstdc++-33(x86_64)-3.2.3 passedVerifying Package: compat-libstdc++-33-3.2.3 (x86_64) ...PASSEDVerifying Package: libxcb-1.11 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libxcb(x86_64)-1.12-1.el7 libxcb(x86_64)-1.11 passedVerifying Package: libxcb-1.11 (x86_64) ...PASSEDVerifying Package: libX11-1.6.3 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libX11(x86_64)-1.6.5-1.el7 libX11(x86_64)-1.6.3 passedVerifying Package: libX11-1.6.3 (x86_64) ...PASSEDVerifying Package: libXau-1.0.8 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libXau(x86_64)-1.0.8-2.1.el7 libXau(x86_64)-1.0.8 passedVerifying Package: libXau-1.0.8 (x86_64) ...PASSEDVerifying Package: libXi-1.7.4 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libXi(x86_64)-1.7.9-1.el7 libXi(x86_64)-1.7.4 passedVerifying Package: libXi-1.7.4 (x86_64) ...PASSEDVerifying Package: libXtst-1.2.2 (x86_64) ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo libXtst(x86_64)-1.2.3-1.el7 libXtst(x86_64)-1.2.2 passedVerifying Package: libXtst-1.2.2 (x86_64) ...PASSEDVerifying Port Availability for component "Oracle Notification Service (ONS)" ...Node Name Port Number Protocol Available Status---------------- ------------ ------------ ------------ ----------------yeshuo 6200 TCP yes successfulyeshuo 6100 TCP yes successfulVerifying Port Availability for component "Oracle Notification Service (ONS)" ...PASSEDVerifying Port Availability for component "Oracle Cluster Synchronization Services (CSSD)" ...Node Name Port Number Protocol Available Status---------------- ------------ ------------ ------------ ----------------yeshuo 42424 TCP yes successfulVerifying Port Availability for component "Oracle Cluster Synchronization Services (CSSD)" ...PASSEDVerifying Users With Same UID: 0 ...PASSEDVerifying Current Group ID ...PASSEDVerifying Root user consistency ...Node Name Status------------------------------------ ------------------------yeshuo passedVerifying Root user consistency ...PASSEDVerifying Package: cvuqdisk-1.0.10-1 ...Node Name Available Required Status------------ ------------------------ ------------------------ ----------yeshuo cvuqdisk-1.0.10-1 cvuqdisk-1.0.10-1 passedVerifying Package: cvuqdisk-1.0.10-1 ...PASSEDVerifying Host name ...PASSEDVerifying Node Connectivity ...Verifying Hosts File ...Node Name Status------------------------------------ ------------------------yeshuo passedVerifying Hosts File ...PASSEDInterface information for node "yeshuo"Name IP Address Subnet Gateway Def. Gateway HW Address MTU------ --------------- --------------- --------------- --------------- ----------------- ------enp0s3 192.168.171.10 192.168.171.0 0.0.0.0 192.168.171.1 08:00:27:2D:43:62 1500Check: MTU consistency of the subnet "192.168.171.0".Node Name IP Address Subnet MTU---------------- ------------ ------------ ------------ ----------------yeshuo enp0s3 192.168.171.10 192.168.171.0 1500Verifying Check that maximum (MTU) size packet goes through subnet ...PASSEDVerifying Node Connectivity ...PASSEDVerifying Multicast or broadcast check ...Checking subnet "192.168.171.0" for multicast communication with multicast group "224.0.0.251"Verifying Multicast or broadcast check ...PASSEDVerifying Network Time Protocol (NTP) ...PASSEDVerifying Same core file name pattern ...PASSEDVerifying User Mask ...Node Name Available Required Comment------------ ------------------------ ------------------------ ----------yeshuo 0022 0022 passedVerifying User Mask ...PASSEDVerifying User Not In Group "root": grid ...Node Name Status Comment------------ ------------------------ ------------------------yeshuo passed does not existVerifying User Not In Group "root": grid ...PASSEDVerifying Time zone consistency ...PASSEDVerifying resolv.conf Integrity ...FAILED (PRVG-13159)Verifying DNS/NIS name service ...PASSEDVerifying Domain Sockets ...PASSEDVerifying /boot mount ...PASSEDVerifying Daemon "avahi-daemon" not configured and running ...Node Name Configured Status------------ ------------------------ ------------------------yeshuo no passedNode Name Running? Status------------ ------------------------ ------------------------yeshuo no passedVerifying Daemon "avahi-daemon" not configured and running ...PASSEDVerifying Daemon "proxyt" not configured and running ...Node Name Configured Status------------ ------------------------ ------------------------yeshuo no passedNode Name Running? Status------------ ------------------------ ------------------------yeshuo no passedVerifying Daemon "proxyt" not configured and running ...PASSEDVerifying User Equivalence ...PASSEDVerifying RPM Package Manager database ...INFORMATION (PRVG-11250)Verifying /dev/shm mounted as temporary file system ...FAILED (PRVE-0427)Verifying File system mount options for path /var ...PASSEDVerifying DefaultTasksMax parameter ...PASSEDVerifying zeroconf check ...PASSEDVerifying ASM Filter Driver configuration ...PASSEDPre-check for cluster services setup was unsuccessful on all the nodes.Failures were encountered during execution of CVU verification request "stage -pre crsinst".Verifying resolv.conf Integrity ...FAILEDyeshuo: PRVG-13159 : On node "yeshuo" the file "/etc/resolv.conf" could not beparsed because the file is empty.Verifying RPM Package Manager database ...INFORMATIONPRVG-11250 : The check "RPM Package Manager database" was not performed becauseit needs 'root' user privileges.Verifying /dev/shm mounted as temporary file system ...FAILEDyeshuo: PRVE-0427 : Failed to retrieve the size of in-memory file systemmounted as /dev/shm on node "yeshuo"CVU operation performed: stage -pre crsinstDate: Sep 19, 2021 4:57:28 PMCVU home: /oracle/app/19.3.0/grid/User: grid说明:删除/etc/resolv.conf即可已配置/dev/shmPRVE-0427 : Failed to retrieve the size of in-memory file system可忽略,使用图形界面并没有发现该报错
十九、配置ASM磁盘
生产多路径配置文件[root@yeshuo ~]# mpathconf --enable[root@yeshuo ~]# ll /etc/multipath.conf-rw------- 1 root root 2415 Sep 19 17:34 /etc/multipath.conf重启多路径服务[root@yeshuo ~]# systemctl restart multipathd.service[root@yeshuo ~]# systemctl enable multipathd.service查看系统磁盘uuid:[root@yeshuo ~]# /usr/lib/udev/scsi_id -g -u /dev/sda1ATA_VBOX_HARDDISK_VB09af5d4d-9b525aff查看数据盘uuid:[root@yeshuo ~]# /usr/lib/udev/scsi_id -g -u /dev/sdc1ATA_VBOX_HARDDISK_VBc3b95daf-52630aca修改多路径配置文件[root@yeshuo ~]# cat /etc/multipath.confblacklist {wwid 1ATA_VBOX_HARDDISK_VB09af5d4d-9b525aff ---系统盘UUIDdevnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"devnode "^hd[a-z][[0-9]*]"devnode "^cciss!c[0-9]d[0-9]*"devnode "^sda[0-9]"}multipaths {multipath {wwid 1ATA_VBOX_HARDDISK_VBc3b95daf-52630aca ---数据盘UUIDalias file_data}}[root@yeshuo ~]#[root@yeshuo mapper]# systemctl reload multipathd说明:这里别名没有生效,所以还是使用mpatha[root@yeshuo mapper]# multipath -llmpatha (VBOX_HARDDISK_VBc3b95daf-52630aca) dm-2 ATA ,VBOX HARDDISKsize=30G features='0' hwhandler='0' wp=rw`-+- policy='service-time 0' prio=1 status=active`- 4:0:0:0 sdc 8:32 active ready running修改磁盘所属用户和用户组[root@yeshuo mapper]# chown grid:asmadmin /dev/mapper/mpatha[root@yeshuo dev]# ll dm-2brw-rw---- 1 grid asmadmin 253, 2 Sep 19 18:02 dm-2查看磁盘DM_UUID[root@yeshuo dev]# udevadm info --query=all --name=/dev/mapper/mpatha |grep DM_UUIDE: DM_UUID=mpath-VBOX_HARDDISK_VBc3b95daf-52630aca添加规则文件cat >>/etc/udev/rules.d/99-oracle-asmdevices.rules <<EOFKERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VBc3b95daf-52630aca",SYMLINK+="data",OWNER="grid",GROUP="asmadmin",MODE="0660"EOF[root@yeshuo dev]# /usr/sbin/udevadm control --reload-rules[root@yeshuo dev]# systemctl status systemd-udevd.service● systemd-udevd.service - udev Kernel Device ManagerLoaded: loaded (/usr/lib/systemd/system/systemd-udevd.service; static; vendor preset: disabled)Active: active (running) since Sun 2021-09-19 16:55:59 CST; 1h 16min agoDocs: man:systemd-udevd.service(8)man:udev(7)Main PID: 511 (systemd-udevd)Status: "Processing with 10 children at max"CGroup: /system.slice/systemd-udevd.service└─511 /usr/lib/systemd/systemd-udevdSep 19 16:55:59 yeshuo systemd[1]: Starting udev Kernel Device Manager...Sep 19 16:55:59 yeshuo systemd-udevd[511]: starting version 219Sep 19 16:55:59 yeshuo systemd[1]: Started udev Kernel Device Manager.[root@yeshuo dev]# systemctl enable systemd-udevd.service
二十、安装GI软件
说明:使用响应文件安装,共有两个响应文件路径,内容是一样的。这里使用grid_install.rsp[grid@yeshuo response]$ ll /oracle/app/19.3.0/grid/inventory/response/grid_install.rsp-rw-r----- 1 grid oinstall 36221 Sep 19 17:22 /oracle/app/19.3.0/grid/inventory/response/grid_install.rsp[grid@yeshuo response]$ ll /oracle/app/19.3.0/grid/install/response/gridsetup.rsp-rw-r-----. 1 grid oinstall 36221 Jan 19 2019 /oracle/app/19.3.0/grid/install/response/gridsetup.rsp[grid@yeshuo response]$ diff /oracle/app/19.3.0/grid/inventory/response/grid_install.rsp /oracle/app/19.3.0/grid/install/response/gridsetup.rsp响应文件内容如下:[grid@yeshuo grid]$ cat /home/grid/grid_install.rsp |grep -v "#" |grep -v "^$"oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0INVENTORY_LOCATION=/oracle/app/oraInventoryoracle.install.option=HA_CONFIGORACLE_BASE=/oracle/app/gridoracle.install.asm.OSDBA=asmdbaoracle.install.asm.OSOPER=asmoperoracle.install.asm.OSASM=asmadminoracle.install.crs.config.scanType=LOCAL_SCANoracle.install.crs.config.SCANClientDataFile=oracle.install.crs.config.gpnp.scanName=oracle.install.crs.config.gpnp.scanPort=oracle.install.crs.config.ClusterConfiguration=STANDALONEoracle.install.crs.config.configureAsExtendedCluster=falseoracle.install.crs.config.memberClusterManifestFile=oracle.install.crs.config.clusterName=oracle.install.crs.config.gpnp.configureGNS=falseoracle.install.crs.config.autoConfigureClusterNodeVIP=falseoracle.install.crs.config.gpnp.gnsOption=CREATE_NEW_GNSoracle.install.crs.config.gpnp.gnsClientDataFile=oracle.install.crs.config.gpnp.gnsSubDomain=oracle.install.crs.config.gpnp.gnsVIPAddress=oracle.install.crs.config.sites=oracle.install.crs.config.clusterNodes=oracle.install.crs.config.networkInterfaceList=oracle.install.crs.configureGIMR=falseoracle.install.asm.configureGIMRDataDG=falseoracle.install.crs.config.storageOption=oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=oracle.install.crs.config.useIPMI=falseoracle.install.crs.config.ipmi.bmcUsername=oracle.install.crs.config.ipmi.bmcPassword=oracle.install.asm.diskGroup.name=DATAoracle.install.asm.diskGroup.redundancy=EXTERNALoracle.install.asm.diskGroup.AUSize=4oracle.install.asm.diskGroup.FailureGroups=oracle.install.asm.diskGroup.disksWithFailureGroupNames=/dev/mapper/mpatha,oracle.install.asm.diskGroup.disks=/dev/mapper/mpathaoracle.install.asm.diskGroup.quorumFailureGroupNames=oracle.install.asm.diskGroup.diskDiscoveryString=/dev/mapper/*oracle.install.asm.gimrDG.name=oracle.install.asm.gimrDG.redundancy=oracle.install.asm.gimrDG.AUSize=1oracle.install.asm.gimrDG.FailureGroups=oracle.install.asm.gimrDG.disksWithFailureGroupNames=oracle.install.asm.gimrDG.disks=oracle.install.asm.gimrDG.quorumFailureGroupNames=oracle.install.asm.configureAFD=trueoracle.install.crs.configureRHPS=falseoracle.install.crs.config.ignoreDownNodes=falseoracle.install.config.managementOption=NONEoracle.install.config.omsHost=oracle.install.config.omsPort=0oracle.install.config.emAdminUser=oracle.install.config.emAdminPassword=oracle.install.crs.rootconfig.executeRootScript=falseoracle.install.crs.rootconfig.configMethod=oracle.install.crs.rootconfig.sudoPath=oracle.install.crs.rootconfig.sudoUserName=oracle.install.crs.config.batchinfo=oracle.install.crs.app.applicationAddress=oracle.install.crs.deleteNode.nodes=静默安装GI[grid@yeshuo grid]$ ./gridSetup.sh -silent -ignorePrereqFailure -responseFile /home/grid/grid_install.rspLaunching Oracle Grid Infrastructure Setup Wizard...The response file for this session can be found at:/oracle/app/19.3.0/grid/install/response/grid_2021-09-19_06-55-45PM.rspYou can find the log of this install session at:/tmp/GridSetupActions2021-09-19_06-55-45PM/gridSetupActions2021-09-19_06-55-45PM.logAs a root user, execute the following script(s):1. /oracle/app/oraInventory/orainstRoot.sh2. /oracle/app/19.3.0/grid/root.shExecute /oracle/app/19.3.0/grid/root.sh on the following nodes:[yeshuo]Successfully Setup Software.As install user, execute the following command to complete the configuration./oracle/app/19.3.0/grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/grid_install.rsp [-silent]Moved the install session logs to:/oracle/app/oraInventory/logs/GridSetupActions2021-09-19_06-55-45PM执行root脚本[root@yeshuo ~]# /oracle/app/oraInventory/orainstRoot.shChanging permissions of /oracle/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /oracle/app/oraInventory to oinstall.The execution of the script is complete.[root@yeshuo ~]# /oracle/app/19.3.0/grid/root.shCheck /oracle/app/19.3.0/grid/install/root_yeshuo_2021-09-19_18-58-55-715169248.log for the output of root script[root@yeshuo ~]# cat /oracle/app/19.3.0/grid/install/root_yeshuo_2021-09-19_18-58-55-715169248.logPerforming root user operation.The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /oracle/app/19.3.0/gridCopying 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 byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Using configuration parameter file: /oracle/app/19.3.0/grid/crs/install/crsconfig_paramsThe log of current session can be found at:/oracle/app/grid/crsdata/yeshuo/crsconfig/roothas_2021-09-19_06-58-56PM.log2021/09/19 18:59:01 CLSRSC-363: User ignored prerequisites during installationLOCAL ADD MODECreating OCR keys for user 'grid', privgrp 'oinstall'..Operation successful.LOCAL ONLY MODESuccessfully accumulated necessary OCR keys.Creating OCR keys for user 'root', privgrp 'root'..Operation successful.CRS-4664: Node yeshuo successfully pinned.2021/09/19 19:00:16 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'yeshuo 2021/09/19 19:02:07 /oracle/app/grid/crsdata/yeshuo/olr/backup_20210919_190207.olr 7249608442021/09/19 19:02:27 CLSRSC-327: Successfully configured Oracle Restart for a standalone server执行配置脚本[grid@yeshuo grid]$ /oracle/app/19.3.0/grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/grid_install.rsp -silentLaunching Oracle Grid Infrastructure Setup Wizard...You can find the logs of this session at:/oracle/app/oraInventory/logs/GridSetupActions2021-09-19_07-03-40PMYou can find the log of this install session at:/oracle/app/oraInventory/logs/UpdateNodeList2021-09-19_07-03-40PM.logSuccessfully Configured Software.查看安装是否正常[grid@yeshuo grid]$ crsctl stat res -t--------------------------------------------------------------------------------Name Target State Server State details--------------------------------------------------------------------------------Local Resources--------------------------------------------------------------------------------ora.DATA.dgONLINE ONLINE yeshuo STABLEora.LISTENER.lsnrONLINE ONLINE yeshuo STABLEora.asmONLINE ONLINE yeshuo Started,STABLEora.onsOFFLINE OFFLINE yeshuo STABLE--------------------------------------------------------------------------------Cluster Resources--------------------------------------------------------------------------------ora.cssd1 ONLINE ONLINE yeshuo STABLEora.diskmon1 OFFLINE OFFLINE STABLEora.driver.afd1 ONLINE ONLINE yeshuo STABLEora.evmd1 ONLINE ONLINE yeshuo STABLE--------------------------------------------------------------------------------
二十二、安装DB软件
解压文件到ORACLE_ HOME目录[oracle@yeshuo ~]$ unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME响应文件内容如下:[oracle@yeshuo ~]$ cat /home/oracle/db_install.rsp |grep -v "#" |grep -v "^$"oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0oracle.install.option=INSTALL_DB_SWONLYUNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/oracle/app/oraInventoryORACLE_BASE=/oracle/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.OSDBA_GROUP=dbaoracle.install.db.OSOPER_GROUP=operoracle.install.db.OSBACKUPDBA_GROUP=backupdbaoracle.install.db.OSDGDBA_GROUP=dgdbaoracle.install.db.OSKMDBA_GROUP=kmdbaoracle.install.db.OSRACDBA_GROUP=racdbaoracle.install.db.rootconfig.executeRootScript=falseoracle.install.db.rootconfig.configMethod=oracle.install.db.rootconfig.sudoPath=oracle.install.db.rootconfig.sudoUserName=oracle.install.db.CLUSTER_NODES=oracle.install.db.config.starterdb.type=GENERAL_PURPOSEoracle.install.db.config.starterdb.globalDBName=oracle.install.db.config.starterdb.SID=oracle.install.db.ConfigureAsContainerDB=falseoracle.install.db.config.PDBName=oracle.install.db.config.starterdb.characterSet=oracle.install.db.config.starterdb.memoryOption=falseoracle.install.db.config.starterdb.memoryLimit=oracle.install.db.config.starterdb.installExampleSchemas=falseoracle.install.db.config.starterdb.password.ALL=oracle.install.db.config.starterdb.password.SYS=oracle.install.db.config.starterdb.password.SYSTEM=oracle.install.db.config.starterdb.password.DBSNMP=oracle.install.db.config.starterdb.password.PDBADMIN=oracle.install.db.config.starterdb.managementOption=DEFAULToracle.install.db.config.starterdb.omsHost=oracle.install.db.config.starterdb.omsPort=0oracle.install.db.config.starterdb.emAdminUser=oracle.install.db.config.starterdb.emAdminPassword=oracle.install.db.config.starterdb.enableRecovery=falseoracle.install.db.config.starterdb.storageType=oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=oracle.install.db.config.asm.diskGroup=oracle.install.db.config.asm.ASMSNMPPassword=静默安装[oracle@yeshuo db_1]$ ./runInstaller -silent -ignorePrereqFailure -responseFile /home/oracle/db_install.rspLaunching Oracle Database Setup Wizard...The response file for this session can be found at:/oracle/app/oracle/product/19.3.0/db_1/install/response/db_2021-09-19_07-20-59PM.rspYou can find the log of this install session at:/oracle/app/oraInventory/logs/InstallActions2021-09-19_07-20-59PM/installActions2021-09-19_07-20-59PM.logAs a root user, execute the following script(s):1. /oracle/app/oracle/product/19.3.0/db_1/root.shExecute /oracle/app/oracle/product/19.3.0/db_1/root.sh on the following nodes:[yeshuo]Successfully Setup Software.执行root脚本[root@yeshuo oracle]# /oracle/app/oracle/product/19.3.0/db_1/root.shCheck /oracle/app/oracle/product/19.3.0/db_1/install/root_yeshuo_2021-09-19_19-23-35-194145632.log for the output of root script[root@yeshuo oracle]# cat /oracle/app/oracle/product/19.3.0/db_1/install/root_yeshuo_2021-09-19_19-23-35-194145632.logPerforming root user operation.The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME= /oracle/app/oracle/product/19.3.0/db_1Copying dbhome to /usr/local/bin ...Copying oraenv to /usr/local/bin ...Copying coraenv to /usr/local/bin ...Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Oracle Trace File Analyzer (TFA) is available at : /oracle/app/oracle/product/19.3.0/db_1/bin/tfactl
二十三、DBCA建库
dbca响应文件内容如下:[oracle@yeshuo ~]$ cat /home/oracle/dbca.rsp |grep -v "^#" |grep -v "^$"responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0gdbName=yeshuosid=yeshuodatabaseConfigType=SIRACOneNodeServiceName=policyManaged=falsecreateServerPool=falseserverPoolName=cardinality=force=falsepqPoolName=pqCardinality=createAsContainerDatabase=truenumberOfPDBs=1pdbName=mytestuseLocalUndoForPDBs=truepdbAdminPassword=Password#123nodelist=templateName=/oracle/app/oracle/product/19.3.0/db_1/assistants/dbca/templates/General_Purpose.dbcsysPassword=Password#123systemPassword=Password#123serviceUserPassword=Password#123emConfiguration=emExpressPort=5500runCVUChecks=FALSEdbsnmpPassword=omsHost=omsPort=0emUser=emPassword=dvConfiguration=falsedvUserName=dvUserPassword=dvAccountManagerName=dvAccountManagerPassword=olsConfiguration=falsedatafileJarLocation={ORACLE_HOME}/assistants/dbca/templates/datafileDestination=+DATA/{DB_UNIQUE_NAME}/recoveryAreaDestination=storageType=ASMdiskGroupName=+DATA/{DB_UNIQUE_NAME}/asmsnmpPassword=recoveryGroupName=characterSet=ZHS16GBKnationalCharacterSet=AL16UTF16registerWithDirService=falsedirServiceUserName=dirServicePassword=walletPassword=listeners=variablesFile=variables=ORACLE_BASE_HOME=/oracle/app/oracle/product/19.3.0/db_1,DB_UNIQUE_NAME=yeshuo,ORACLE_BASE=/oracle/app/oracle,PDB_NAME=,DB_NAME=yeshuo,ORACLE_HOME=/oracle/app/oracle/product/19.3.0/db_1,SID=yeshuoinitParams=undo_tablespace=UNDOTBS1,sga_target=2394MB,db_block_size=8192BYTES,nls_language=AMERICAN,dispatchers=(PROTOCOL=TCP) (SERVICE=yeshuoXDB),diagnostic_dest={ORACLE_BASE},remote_login_passwordfile=EXCLUSIVE,db_create_file_dest=+DATA/{DB_UNIQUE_NAME}/,audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,processes=300,pga_aggregate_target=798MB,nls_territory=AMERICA,local_listener=LISTENER_YESHUO,open_cursors=300,compatible=19.0.0,db_name=yeshuo,audit_trail=dbsampleSchema=truememoryPercentage=40databaseType=MULTIPURPOSEautomaticMemoryManagement=falsetotalMemory=0dbca静默建库[oracle@yeshuo ~]$ dbca -silent -ignorePrereqFailure -createDatabase -responseFile /home/oracle/dbca.rspPrepare for db operation7% completeRegistering database with Oracle Restart11% completeCopying database files33% completeCreating and starting Oracle instance35% complete38% complete42% complete45% complete48% completeCompleting Database Creation53% complete55% complete56% completeCreating Pluggable Databases60% complete78% completeExecuting Post Configuration Actions100% completeDatabase creation complete. For details check the logfiles at:/oracle/app/oracle/cfgtoollogs/dbca/yeshuo.Database Information:Global Database Name:yeshuoSystem Identifier(SID):yeshuoLook at the log file "/oracle/app/oracle/cfgtoollogs/dbca/yeshuo/yeshuo.log" for further details.登陆sqlplus检查是否正常[oracle@yeshuo ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Sun Sep 19 19:58:25 2021Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.Connected to:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0SQL> show pdbsCON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ----------2 PDB$SEED READ ONLY NO3 MYTEST READ WRITE NOSQL>
安装结束。
文章转载自夜说是如何炼成的,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




