一、操作系统信息
1.系统版本(最小化安装)
[root@yeshuo ~]# cat etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
2.内核信息
[root@yeshuo ~]# uname -r
3.10.0-862.el7.x86_64
3.磁盘规划
[root@yeshuo ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 58G 1000M 57G 2%
devtmpfs 3.9G 0 3.9G 0% dev
tmpfs 3.9G 0 3.9G 0% dev/shm
tmpfs 3.9G 8.6M 3.9G 1% run
tmpfs 3.9G 0 3.9G 0% sys/fs/cgroup
/dev/sda1 1014M 130M 885M 13% boot
tmpfs 799M 0 799M 0% run/user/0
4.内存信息
[root@yeshuo ~]# free -g
total used free shared buff/cache available
Mem: 7 0 7 0 0 7
Swap: 4 0 4
5.CPU信息
[root@yeshuo ~]# lscpu |grep CPU
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 1
On-line CPU(s) list: 0
CPU family: 6
Model name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
CPU MHz: 1799.998
NUMA 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 oracle
Changing password for user oracle.
passwd: all authentication tokens updated successfully.
[root@yeshuo ~]# echo oracle | passwd --stdin grid
Changing 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 functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
######add by oracle######
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=+ASM
export ORACLE_BASE=/oracle/app/grid
export ORACLE_HOME=/oracle/app/19.3.0/grid
export ORACLE_TERM=xterm
export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$ORACLE_HOME/bin:$PATH:/usr/sbin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export EDITOR=vi
export LANG=en_US
export NLS_LANG=american_america.ZHS16GBK
umask 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/grid
2.ORACLE用户添加环境变量如下:
[oracle@yeshuo ~]$ vi .bash_profile
[oracle@yeshuo ~]$ cat .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
######add by oracle######
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=yeshuo
export ORACLE_SID=yeshuo
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$PATH:/usr/sbin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export EDITOR=vi
export LANG=en_US
export NLS_LANG=american_america.ZHS16GBK
export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
umask 022
######add by oracle######
[oracle@yeshuo ~]$ source .bash_profile
[oracle@yeshuo ~]$ echo $ORACLE_SID
yeshuo
[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/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_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.cfg
Generating grub configuration file ...
Found linux image: boot/vmlinuz-3.10.0-862.el7.x86_64
Found initrd image: boot/initramfs-3.10.0-862.el7.x86_64.img
Found linux image: boot/vmlinuz-0-rescue-b73300e2fcb08b43b69abca893877604
Found initrd image: boot/initramfs-0-rescue-b73300e2fcb08b43b69abca893877604.img
done
重启生效(安装过程中还会有其他需要重启需求的话,可以最后一起重启,避免多次重启)
[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/meminfo
AnonHugePages: 0 kB
复制
六、禁用SELINUX和关闭防火墙
1.需要重启生效
[root@yeshuo ~]# cat /etc/selinux/config |grep -v '#'
SELINUX=disabled
SELINUXTYPE=targeted
2.不重启生效(临时生效,重启后不再生效)
[root@yeshuo ~]# setenforce 0
3.关闭防火墙
[root@yeshuo ~]# systemctl stop firewalld
[root@yeshuo ~]# systemctl disable firewalld
Removed 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 daemon
Loaded: 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
> EOF
sysctl -p使内核参数生效
[root@yeshuo ~]# sysctl -p
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
复制
八、修改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/hosts
127.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 -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 58G 1001M 57G 2%
devtmpfs 3.9G 0 3.9G 0% dev
tmpfs 3.9G 0 3.9G 0% dev/shm
tmpfs 3.9G 8.6M 3.9G 1% run
tmpfs 3.9G 0 3.9G 0% sys/fs/cgroup
/dev/sda1 1014M 130M 885M 13% boot
tmpfs 799M 0 799M 0% run/user/0
[root@yeshuo ~]# umount dev/shm
[root@yeshuo ~]# mount -a
[root@yeshuo ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 58G 1001M 57G 2%
devtmpfs 3.9G 0 3.9G 0% dev
tmpfs 3.9G 8.6M 3.9G 1% run
tmpfs 3.9G 0 3.9G 0% sys/fs/cgroup
/dev/sda1 1014M 130M 885M 13% boot
tmpfs 799M 0 799M 0% run/user/0
tmpfs 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 anaconda
NOZEROCONF=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_limits
session 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=rhel
baseurl=file:///mnt/cdrom
gpgcheck=0
enabled=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 -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 58G 5.3G 53G 10%
devtmpfs 3.9G 0 3.9G 0% dev
tmpfs 3.9G 8.7M 3.9G 1% run
tmpfs 3.9G 0 3.9G 0% sys/fs/cgroup
/dev/sda1 1014M 130M 885M 13% boot
tmpfs 799M 0 799M 0% run/user/0
tmpfs 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.rpm
warning: compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ################################# [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.rpm
Preparing... ################################# [100%]
Using default group oinstall to install package
Updating 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 ...FAILED
yeshuo: 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/sdb1
Setting up swapspace version 1, size = 10484732 KiB
no 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 -g
total used free shared buff/cache available
Mem: 7 0 7 0 0 7
Swap: 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=no
RemoveIPC=no
复制
十八、预检查如下
[grid@yeshuo ~]$ cd oracle/app/19.3.0/grid/
[grid@yeshuo grid]$ ./runcluvfy.sh stage -pre crsinst -n yeshuo -fixup -verbose
Verifying Physical Memory ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo 7.7961GB (8174788.0KB) 8GB (8388608.0KB) passed
Verifying Physical Memory ...PASSED
Verifying Available Physical Memory ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo 7.4683GB (7831040.0KB) 50MB (51200.0KB) passed
Verifying Available Physical Memory ...PASSED
Verifying Swap Size ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo 14.999GB (1.5727608E7KB) 7.7961GB (8174788.0KB) passed
Verifying Swap Size ...PASSED
Verifying 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 passed
var yeshuo 48.6758GB 5MB passed
etc yeshuo 48.6758GB 25MB passed
sbin yeshuo 48.6758GB 10MB passed
/tmp yeshuo / 48.6758GB 1GB passed
Verifying Free Space: yeshuo:/usr,yeshuo:/var,yeshuo:/etc,yeshuo:/sbin,yeshuo:/tmp ...PASSED
Verifying User Existence: grid ...
Node Name Status Comment
------------ ------------------------ ------------------------
yeshuo passed exists(54322)
Verifying Users With Same UID: 54322 ...PASSED
Verifying User Existence: grid ...PASSED
Verifying Group Existence: asmadmin ...
Node Name Status Comment
------------ ------------------------ ------------------------
yeshuo passed exists
Verifying Group Existence: asmadmin ...PASSED
Verifying Group Existence: asmdba ...
Node Name Status Comment
------------ ------------------------ ------------------------
yeshuo passed exists
Verifying Group Existence: asmdba ...PASSED
Verifying Group Existence: oinstall ...
Node Name Status Comment
------------ ------------------------ ------------------------
yeshuo passed exists
Verifying Group Existence: oinstall ...PASSED
Verifying Group Membership: asmdba ...
Node Name User Exists Group Exists User in Group Status
---------------- ------------ ------------ ------------ ----------------
yeshuo yes yes yes passed
Verifying Group Membership: asmdba ...PASSED
Verifying Group Membership: asmadmin ...
Node Name User Exists Group Exists User in Group Status
---------------- ------------ ------------ ------------ ----------------
yeshuo yes yes yes passed
Verifying Group Membership: asmadmin ...PASSED
Verifying Group Membership: oinstall(Primary) ...
Node Name User Exists Group Exists User in Group Primary Status
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo yes yes yes yes passed
Verifying Group Membership: oinstall(Primary) ...PASSED
Verifying Run Level ...
Node Name run level Required Status
------------ ------------------------ ------------------------ ----------
yeshuo 3 3,5 passed
Verifying Run Level ...PASSED
Verifying Architecture ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo x86_64 x86_64 passed
Verifying Architecture ...PASSED
Verifying OS Kernel Version ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo 3.10.0-862.el7.x86_64 3.10.0 passed
Verifying OS Kernel Version ...PASSED
Verifying OS Kernel Parameter: semmsl ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 250 250 250 passed
Verifying OS Kernel Parameter: semmsl ...PASSED
Verifying OS Kernel Parameter: semmns ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 32000 32000 32000 passed
Verifying OS Kernel Parameter: semmns ...PASSED
Verifying OS Kernel Parameter: semopm ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 100 100 100 passed
Verifying OS Kernel Parameter: semopm ...PASSED
Verifying OS Kernel Parameter: semmni ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 128 128 128 passed
Verifying OS Kernel Parameter: semmni ...PASSED
Verifying OS Kernel Parameter: shmmax ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 549755813760 549755813760 4185491456 passed
Verifying OS Kernel Parameter: shmmax ...PASSED
Verifying OS Kernel Parameter: shmmni ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 4096 4096 4096 passed
Verifying OS Kernel Parameter: shmmni ...PASSED
Verifying OS Kernel Parameter: shmall ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 2684354560 2684354560 134217727 passed
Verifying OS Kernel Parameter: shmall ...PASSED
Verifying OS Kernel Parameter: file-max ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 6815744 6815744 6815744 passed
Verifying OS Kernel Parameter: file-max ...PASSED
Verifying OS Kernel Parameter: ip_local_port_range ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo between 9000 & 65500 between 9000 & 65500 between 9000 & 65535 passed
Verifying OS Kernel Parameter: ip_local_port_range ...PASSED
Verifying OS Kernel Parameter: rmem_default ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 262144 262144 262144 passed
Verifying OS Kernel Parameter: rmem_default ...PASSED
Verifying OS Kernel Parameter: rmem_max ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 4194304 4194304 4194304 passed
Verifying OS Kernel Parameter: rmem_max ...PASSED
Verifying OS Kernel Parameter: wmem_default ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 262144 262144 262144 passed
Verifying OS Kernel Parameter: wmem_default ...PASSED
Verifying OS Kernel Parameter: wmem_max ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 1048576 1048576 1048576 passed
Verifying OS Kernel Parameter: wmem_max ...PASSED
Verifying OS Kernel Parameter: aio-max-nr ...
Node Name Current Configured Required Status Comment
---------------- ------------ ------------ ------------ ------------ ------------
yeshuo 1048576 1048576 1048576 passed
Verifying OS Kernel Parameter: aio-max-nr ...PASSED
Verifying Package: kmod-20-21 (x86_64) ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo kmod(x86_64)-20-21.el7 kmod(x86_64)-20-21 passed
Verifying Package: kmod-20-21 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: kmod-libs-20-21 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: binutils-2.23.52.0.1 ...PASSED
Verifying Package: compat-libcap1-1.10 ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo compat-libcap1-1.10-7.el7 compat-libcap1-1.10 passed
Verifying Package: compat-libcap1-1.10 ...PASSED
Verifying 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 passed
Verifying Package: libgcc-4.8.2 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: libstdc++-4.8.2 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: libstdc++-devel-4.8.2 (x86_64) ...PASSED
Verifying Package: sysstat-10.1.5 ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo sysstat-10.1.5-13.el7 sysstat-10.1.5 passed
Verifying Package: sysstat-10.1.5 ...PASSED
Verifying Package: gcc-c++-4.8.2 ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo gcc-c++-4.8.5-28.el7 gcc-c++-4.8.2 passed
Verifying Package: gcc-c++-4.8.2 ...PASSED
Verifying Package: ksh ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo ksh ksh passed
Verifying Package: ksh ...PASSED
Verifying Package: make-3.82 ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo make-3.82-23.el7 make-3.82 passed
Verifying Package: make-3.82 ...PASSED
Verifying Package: glibc-2.17 (x86_64) ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo glibc(x86_64)-2.17-222.el7 glibc(x86_64)-2.17 passed
Verifying Package: glibc-2.17 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: glibc-devel-2.17 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: libaio-0.3.109 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: libaio-devel-0.3.109 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: nfs-utils-1.2.3-15 ...PASSED
Verifying Package: smartmontools-6.2-4 ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo smartmontools-6.5-1.el7 smartmontools-6.2-4 passed
Verifying Package: smartmontools-6.2-4 ...PASSED
Verifying 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 passed
Verifying Package: net-tools-2.0-0.17 ...PASSED
Verifying 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 passed
Verifying Package: compat-libstdc++-33-3.2.3 (x86_64) ...PASSED
Verifying Package: libxcb-1.11 (x86_64) ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo libxcb(x86_64)-1.12-1.el7 libxcb(x86_64)-1.11 passed
Verifying Package: libxcb-1.11 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: libX11-1.6.3 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: libXau-1.0.8 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: libXi-1.7.4 (x86_64) ...PASSED
Verifying 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 passed
Verifying Package: libXtst-1.2.2 (x86_64) ...PASSED
Verifying Port Availability for component "Oracle Notification Service (ONS)" ...
Node Name Port Number Protocol Available Status
---------------- ------------ ------------ ------------ ----------------
yeshuo 6200 TCP yes successful
yeshuo 6100 TCP yes successful
Verifying Port Availability for component "Oracle Notification Service (ONS)" ...PASSED
Verifying Port Availability for component "Oracle Cluster Synchronization Services (CSSD)" ...
Node Name Port Number Protocol Available Status
---------------- ------------ ------------ ------------ ----------------
yeshuo 42424 TCP yes successful
Verifying Port Availability for component "Oracle Cluster Synchronization Services (CSSD)" ...PASSED
Verifying Users With Same UID: 0 ...PASSED
Verifying Current Group ID ...PASSED
Verifying Root user consistency ...
Node Name Status
------------------------------------ ------------------------
yeshuo passed
Verifying Root user consistency ...PASSED
Verifying Package: cvuqdisk-1.0.10-1 ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
yeshuo cvuqdisk-1.0.10-1 cvuqdisk-1.0.10-1 passed
Verifying Package: cvuqdisk-1.0.10-1 ...PASSED
Verifying Host name ...PASSED
Verifying Node Connectivity ...
Verifying Hosts File ...
Node Name Status
------------------------------------ ------------------------
yeshuo passed
Verifying Hosts File ...PASSED
Interface 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 1500
Check: 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 1500
Verifying Check that maximum (MTU) size packet goes through subnet ...PASSED
Verifying Node Connectivity ...PASSED
Verifying 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 ...PASSED
Verifying Network Time Protocol (NTP) ...PASSED
Verifying Same core file name pattern ...PASSED
Verifying User Mask ...
Node Name Available Required Comment
------------ ------------------------ ------------------------ ----------
yeshuo 0022 0022 passed
Verifying User Mask ...PASSED
Verifying User Not In Group "root": grid ...
Node Name Status Comment
------------ ------------------------ ------------------------
yeshuo passed does not exist
Verifying User Not In Group "root": grid ...PASSED
Verifying Time zone consistency ...PASSED
Verifying resolv.conf Integrity ...FAILED (PRVG-13159)
Verifying DNS/NIS name service ...PASSED
Verifying Domain Sockets ...PASSED
Verifying /boot mount ...PASSED
Verifying Daemon "avahi-daemon" not configured and running ...
Node Name Configured Status
------------ ------------------------ ------------------------
yeshuo no passed
Node Name Running? Status
------------ ------------------------ ------------------------
yeshuo no passed
Verifying Daemon "avahi-daemon" not configured and running ...PASSED
Verifying Daemon "proxyt" not configured and running ...
Node Name Configured Status
------------ ------------------------ ------------------------
yeshuo no passed
Node Name Running? Status
------------ ------------------------ ------------------------
yeshuo no passed
Verifying Daemon "proxyt" not configured and running ...PASSED
Verifying User Equivalence ...PASSED
Verifying 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 ...PASSED
Verifying DefaultTasksMax parameter ...PASSED
Verifying zeroconf check ...PASSED
Verifying ASM Filter Driver configuration ...PASSED
Pre-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 ...FAILED
yeshuo: PRVG-13159 : On node "yeshuo" the file "/etc/resolv.conf" could not be
parsed because the file is empty.
Verifying RPM Package Manager database ...INFORMATION
PRVG-11250 : The check "RPM Package Manager database" was not performed because
it needs 'root' user privileges.
Verifying /dev/shm mounted as temporary file system ...FAILED
yeshuo: PRVE-0427 : Failed to retrieve the size of in-memory file system
mounted as /dev/shm on node "yeshuo"
CVU operation performed: stage -pre crsinst
Date: Sep 19, 2021 4:57:28 PM
CVU home: /oracle/app/19.3.0/grid/
User: grid
说明:删除/etc/resolv.conf即可
已配置/dev/shm
PRVE-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/sda
1ATA_VBOX_HARDDISK_VB09af5d4d-9b525aff
查看数据盘uuid:
[root@yeshuo ~]# /usr/lib/udev/scsi_id -g -u /dev/sdc
1ATA_VBOX_HARDDISK_VBc3b95daf-52630aca
修改多路径配置文件
[root@yeshuo ~]# cat /etc/multipath.conf
blacklist {
wwid 1ATA_VBOX_HARDDISK_VB09af5d4d-9b525aff ---系统盘UUID
devnode "^(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 ---数据盘UUID
alias file_data
}
}
[root@yeshuo ~]#
[root@yeshuo mapper]# systemctl reload multipathd
说明:这里别名没有生效,所以还是使用mpatha
[root@yeshuo mapper]# multipath -ll
mpatha (VBOX_HARDDISK_VBc3b95daf-52630aca) dm-2 ATA ,VBOX HARDDISK
size=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-2
brw-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_UUID
E: DM_UUID=mpath-VBOX_HARDDISK_VBc3b95daf-52630aca
添加规则文件
cat >>/etc/udev/rules.d/99-oracle-asmdevices.rules <<EOF
KERNEL=="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 Manager
Loaded: 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 ago
Docs: 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-udevd
Sep 19 16:55:59 yeshuo systemd[1]: Starting udev Kernel Device Manager...
Sep 19 16:55:59 yeshuo systemd-udevd[511]: starting version 219
Sep 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.0
INVENTORY_LOCATION=/oracle/app/oraInventory
oracle.install.option=HA_CONFIG
ORACLE_BASE=/oracle/app/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.scanType=LOCAL_SCAN
oracle.install.crs.config.SCANClientDataFile=
oracle.install.crs.config.gpnp.scanName=
oracle.install.crs.config.gpnp.scanPort=
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.config.memberClusterManifestFile=
oracle.install.crs.config.clusterName=
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.gpnp.gnsOption=CREATE_NEW_GNS
oracle.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=false
oracle.install.asm.configureGIMRDataDG=false
oracle.install.crs.config.storageOption=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.useIPMI=false
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=
oracle.install.asm.diskGroup.name=DATA
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.diskGroup.FailureGroups=
oracle.install.asm.diskGroup.disksWithFailureGroupNames=/dev/mapper/mpatha,
oracle.install.asm.diskGroup.disks=/dev/mapper/mpatha
oracle.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=1
oracle.install.asm.gimrDG.FailureGroups=
oracle.install.asm.gimrDG.disksWithFailureGroupNames=
oracle.install.asm.gimrDG.disks=
oracle.install.asm.gimrDG.quorumFailureGroupNames=
oracle.install.asm.configureAFD=true
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.config.omsHost=
oracle.install.config.omsPort=0
oracle.install.config.emAdminUser=
oracle.install.config.emAdminPassword=
oracle.install.crs.rootconfig.executeRootScript=false
oracle.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.rsp
Launching 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.rsp
You can find the log of this install session at:
/tmp/GridSetupActions2021-09-19_06-55-45PM/gridSetupActions2021-09-19_06-55-45PM.log
As a root user, execute the following script(s):
1. /oracle/app/oraInventory/orainstRoot.sh
2. /oracle/app/19.3.0/grid/root.sh
Execute /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.sh
Changing 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.sh
Check /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.log
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /oracle/app/19.3.0/grid
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.
Using configuration parameter file: /oracle/app/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/oracle/app/grid/crsdata/yeshuo/crsconfig/roothas_2021-09-19_06-58-56PM.log
2021/09/19 18:59:01 CLSRSC-363: User ignored prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully 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 724960844
2021/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 -silent
Launching Oracle Grid Infrastructure Setup Wizard...
You can find the logs of this session at:
/oracle/app/oraInventory/logs/GridSetupActions2021-09-19_07-03-40PM
You can find the log of this install session at:
/oracle/app/oraInventory/logs/UpdateNodeList2021-09-19_07-03-40PM.log
Successfully Configured Software.
查看安装是否正常
[grid@yeshuo grid]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE yeshuo STABLE
ora.LISTENER.lsnr
ONLINE ONLINE yeshuo STABLE
ora.asm
ONLINE ONLINE yeshuo Started,STABLE
ora.ons
OFFLINE OFFLINE yeshuo STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE yeshuo STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.driver.afd
1 ONLINE ONLINE yeshuo STABLE
ora.evmd
1 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.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/oracle/app/oraInventory
ORACLE_BASE=/oracle/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
oracle.install.db.rootconfig.executeRootScript=false
oracle.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_PURPOSE
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.ConfigureAsContainerDB=false
oracle.install.db.config.PDBName=
oracle.install.db.config.starterdb.characterSet=
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.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=DEFAULT
oracle.install.db.config.starterdb.omsHost=
oracle.install.db.config.starterdb.omsPort=0
oracle.install.db.config.starterdb.emAdminUser=
oracle.install.db.config.starterdb.emAdminPassword=
oracle.install.db.config.starterdb.enableRecovery=false
oracle.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.rsp
Launching 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.rsp
You 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.log
As a root user, execute the following script(s):
1. /oracle/app/oracle/product/19.3.0/db_1/root.sh
Execute /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.sh
Check /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.log
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/app/oracle/product/19.3.0/db_1
Copying 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 by
Database Configuration Assistant when a database is created
Finished 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.0
gdbName=yeshuo
sid=yeshuo
databaseConfigType=SI
RACOneNodeServiceName=
policyManaged=false
createServerPool=false
serverPoolName=
cardinality=
force=false
pqPoolName=
pqCardinality=
createAsContainerDatabase=true
numberOfPDBs=1
pdbName=mytest
useLocalUndoForPDBs=true
pdbAdminPassword=Password#123
nodelist=
templateName=/oracle/app/oracle/product/19.3.0/db_1/assistants/dbca/templates/General_Purpose.dbc
sysPassword=Password#123
systemPassword=Password#123
serviceUserPassword=Password#123
emConfiguration=
emExpressPort=5500
runCVUChecks=FALSE
dbsnmpPassword=
omsHost=
omsPort=0
emUser=
emPassword=
dvConfiguration=false
dvUserName=
dvUserPassword=
dvAccountManagerName=
dvAccountManagerPassword=
olsConfiguration=false
datafileJarLocation={ORACLE_HOME}/assistants/dbca/templates/
datafileDestination=+DATA/{DB_UNIQUE_NAME}/
recoveryAreaDestination=
storageType=ASM
diskGroupName=+DATA/{DB_UNIQUE_NAME}/
asmsnmpPassword=
recoveryGroupName=
characterSet=ZHS16GBK
nationalCharacterSet=AL16UTF16
registerWithDirService=false
dirServiceUserName=
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=yeshuo
initParams=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=db
sampleSchema=true
memoryPercentage=40
databaseType=MULTIPURPOSE
automaticMemoryManagement=false
totalMemory=0
dbca静默建库
[oracle@yeshuo ~]$ dbca -silent -ignorePrereqFailure -createDatabase -responseFile /home/oracle/dbca.rsp
Prepare for db operation
7% complete
Registering database with Oracle Restart
11% complete
Copying database files
33% complete
Creating and starting Oracle instance
35% complete
38% complete
42% complete
45% complete
48% complete
Completing Database Creation
53% complete
55% complete
56% complete
Creating Pluggable Databases
60% complete
78% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/oracle/app/oracle/cfgtoollogs/dbca/yeshuo.
Database Information:
Global Database Name:yeshuo
System Identifier(SID):yeshuo
Look at the log file "/oracle/app/oracle/cfgtoollogs/dbca/yeshuo/yeshuo.log" for further details.
登陆sqlplus检查是否正常
[oracle@yeshuo ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Sep 19 19:58:25 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYTEST READ WRITE NO
SQL>
复制
安装结束。
文章转载自夜说是如何炼成的,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
676次阅读
2025-04-18 14:18:38
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
634次阅读
2025-04-15 17:24:06
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
541次阅读
2025-04-20 10:07:02
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
491次阅读
2025-04-17 17:02:24
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
487次阅读
2025-04-22 00:20:37
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
470次阅读
2025-04-22 00:13:51
一页概览:Oracle GoldenGate
甲骨文云技术
467次阅读
2025-04-30 12:17:56
火焰图--分析复杂SQL执行计划的利器
听见风的声音
413次阅读
2025-04-17 09:30:30
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
372次阅读
2025-04-15 14:48:05
OR+DBLINK的关联SQL优化思路
布衣
352次阅读
2025-05-05 19:28:36