最近有个项目要搭建测试环境在云平台上,加上又刚参加完oracle组织的oracle 19c的升级培训,所以准备在测试环境里面直接安装oracle19c,提前熟悉一下。并将安装过程记录分享给大家,这里主要介绍两种安装方式,一种是普通的图形界面安装,一种是静默安装。oracle19c还可以通过rpm包在线自动安装,这里不进行介绍。
         oracle官方说法是Oracle Database 19c会作为Oracle长期支持的稳定版本,官方也建议大家选择19c这个版本的数据库。

一、安装准备

1、下载安装包

     目前在官网下载19c时,详细的版本是 19.3,下载地址https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html。大家可以选择对应的操作系统版本下载。

2、服务器环境

事项详情
操作系统Centos 7.3
数据库版本19.3.0
CPUinter 16核 2.30GHz
内存64GB
swap20GB

     云平台统一的操作系统版本较低,我这边是7.3,问题应该不大,oracle官方建议是7.4版本以上。硬件配置是测试环境不是很高。
在这里插入图片描述

3、准备安装环境

3.1、服务器环境检查

[root@host-173-16-87-178 /]# grep MemTotal /proc/meminfo
MemTotal:       65806316 kB
[root@host-173-16-87-178 /]#  grep SwapTotal /proc/meminfo
SwapTotal:      20971516 kB
[root@host-173-16-87-178 /]#  df -h /tmp
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root   79G   13G   62G  18% /
[root@host-173-16-87-178 /]# df -h /dev/shm
Filesystem      Size  Used Avail Use% Mounted on
tmpfs            32G   28K   32G   1% /dev/shm
[root@host-173-16-87-178 /]# free -g
              total        used        free      shared  buff/cache   available
Mem:             62           0          61           0           0          61
Swap:            19           0          19
[root@host-173-16-87-178 /]#  uname -m
x86_64
[root@host-173-16-87-178 /]# 

3.2、安装系统依赖包

在这里插入图片描述
有以上依赖包要进行安装
1、检查少了哪些依赖包

[root@host-173-16-87-178 ~]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" bc binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat elfutils-libelf elfutils-libelf-devel fontconfig-devel libxcb smartmontools libX11 libXau libXtst libXrender libXrender-devel
bc-1.06.95.13.el7 (x86_64)
binutils-2.25.1.22.base.el7 (x86_64)
package compat-libcap1 is not installed
package compat-libstdc++-33 is not installed
gcc-4.8.5.36.el7_6.2 (x86_64)
package gcc-c++ is not installed
glibc-2.17.292.el7 (x86_64)
glibc-2.17.292.el7 (i686)
glibc-devel-2.17.292.el7 (x86_64)
package ksh is not installed
libaio-0.3.109.13.el7 (x86_64)
package libaio-devel is not installed
libgcc-4.8.5.39.el7 (x86_64)
libgcc-4.8.5.39.el7 (i686)
libstdc++-4.8.5.39.el7 (x86_64)
libstdc++-4.8.5.39.el7 (i686)
package libstdc++-devel is not installed
make-3.82.23.el7 (x86_64)
sysstat-10.1.5.18.el7 (x86_64)
elfutils-libelf-0.176.2.el7 (x86_64)
elfutils-libelf-0.176.2.el7 (i686)
package elfutils-libelf-devel is not installed
package fontconfig-devel is not installed
libxcb-1.13.1.el7 (x86_64)
smartmontools-7.0.1.el7_7.1 (x86_64)
libX11-1.6.5.2.el7 (x86_64)
libXau-1.0.8.2.1.el7 (x86_64)
libXtst-1.2.3.1.el7 (x86_64)
libXrender-0.9.10.1.el7 (x86_64)
package libXrender-devel is not installed
[root@host-173-16-87-178 ~]# 

2、使用yum进行安装

[root@host-173-16-87-178 ~]# yum install -y compat-libcap1 compat-libstdc++-33 gcc-c++ ksh libaio-devel libstdc++-devel elfutils-libelf-devel fontconfig-devel libXrender-devel
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
---> Package elfutils-libelf-devel.x86_64 0:0.176-2.el7 will be installed
---> Package fontconfig-devel.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: pkgconfig(freetype2) >= 20.0.14 for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: freetype-devel >= 2.8-7 for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: pkgconfig(uuid) for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-39.el7 will be installed
--> Processing Dependency: gcc = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.x86_64
---> Package ksh.x86_64 0:20120801-139.el7 will be installed
---> Package libXrender-devel.x86_64 0:0.9.10-1.el7 will be installed
--> Processing Dependency: pkgconfig(renderproto) >= 0.9 for package: libXrender-devel-0.9.10-1.el7.x86_64
--> Processing Dependency: pkgconfig(xproto) for package: libXrender-devel-0.9.10-1.el7.x86_64
--> Processing Dependency: pkgconfig(x11) for package: libXrender-devel-0.9.10-1.el7.x86_64
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-39.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-10.el7_3 will be installed
--> Processing Dependency: expat = 2.1.0-10.el7_3 for package: expat-devel-2.1.0-10.el7_3.x86_64
---> Package freetype-devel.x86_64 0:2.8-14.el7 will be installed
--> Processing Dependency: freetype = 2.8-14.el7 for package: freetype-devel-2.8-14.el7.x86_64
--> Processing Dependency: pkgconfig(libpng) for package: freetype-devel-2.8-14.el7.x86_64
---> Package gcc.x86_64 0:4.8.5-36.el7_6.2 will be updated
---> Package gcc.x86_64 0:4.8.5-39.el7 will be an update
--> Processing Dependency: libgomp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64
--> Processing Dependency: cpp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64
---> Package libX11-devel.x86_64 0:1.6.7-2.el7 will be installed
--> Processing Dependency: libX11 = 1.6.7-2.el7 for package: libX11-devel-1.6.7-2.el7.x86_64
--> Processing Dependency: pkgconfig(xcb) >= 1.11.1 for package: libX11-devel-1.6.7-2.el7.x86_64
--> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.7-2.el7.x86_64
---> Package libuuid-devel.x86_64 0:2.23.2-61.el7_7.1 will be installed
--> Processing Dependency: libuuid = 2.23.2-61.el7_7.1 for package: libuuid-devel-2.23.2-61.el7_7.1.x86_64
---> Package xorg-x11-proto-devel.noarch 0:2018.4-1.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-36.el7_6.2 will be updated
---> Package cpp.x86_64 0:4.8.5-39.el7 will be an update
---> Package expat.x86_64 0:2.1.0-8.el7 will be updated
---> Package expat.x86_64 0:2.1.0-10.el7_3 will be an update
---> Package freetype.x86_64 0:2.8-12.el7_6.1 will be updated
---> Package freetype.x86_64 0:2.8-14.el7 will be an update
---> Package libX11.x86_64 0:1.6.5-2.el7 will be updated
---> Package libX11.x86_64 0:1.6.7-2.el7 will be an update
--> Processing Dependency: libX11-common >= 1.6.7-2.el7 for package: libX11-1.6.7-2.el7.x86_64
---> Package libgomp.x86_64 0:4.8.5-36.el7_6.2 will be updated
---> Package libgomp.x86_64 0:4.8.5-39.el7 will be an update
---> Package libpng-devel.x86_64 2:1.5.13-7.el7_2 will be installed
---> Package libuuid.x86_64 0:2.23.2-33.el7 will be updated
--> Processing Dependency: libuuid = 2.23.2-33.el7 for package: libblkid-2.23.2-33.el7.x86_64
--> Processing Dependency: libuuid = 2.23.2-33.el7 for package: libmount-2.23.2-33.el7.x86_64
--> Processing Dependency: libuuid = 2.23.2-33.el7 for package: util-linux-2.23.2-33.el7.x86_64
---> Package libuuid.x86_64 0:2.23.2-61.el7_7.1 will be an update
---> Package libxcb-devel.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.13-1.el7.x86_64
--> Running transaction check
---> Package libX11-common.noarch 0:1.6.5-2.el7 will be updated
---> Package libX11-common.noarch 0:1.6.7-2.el7 will be an update
---> Package libXau-devel.x86_64 0:1.0.8-2.1.el7 will be installed
---> Package libblkid.x86_64 0:2.23.2-33.el7 will be updated
---> Package libblkid.x86_64 0:2.23.2-61.el7_7.1 will be an update
---> Package libmount.x86_64 0:2.23.2-33.el7 will be updated
---> Package libmount.x86_64 0:2.23.2-61.el7_7.1 will be an update
---> Package util-linux.x86_64 0:2.23.2-33.el7 will be updated
---> Package util-linux.x86_64 0:2.23.2-61.el7_7.1 will be an update
--> Processing Dependency: libsmartcols = 2.23.2-61.el7_7.1 for package: util-linux-2.23.2-61.el7_7.1.x86_64
--> Processing Dependency: libsmartcols.so.1(SMARTCOLS_2.25)(64bit) for package: util-linux-2.23.2-61.el7_7.1.x86_64
--> Processing Dependency: libsmartcols.so.1()(64bit) for package: util-linux-2.23.2-61.el7_7.1.x86_64
--> Running transaction check
---> Package libsmartcols.x86_64 0:2.23.2-61.el7_7.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
 Package                                        Arch                            Version                                    Repository                          Size
====================================================================================================================================================================
Installing:
 compat-libcap1                                 x86_64                          1.10-7.el7                                 CentOS7.3                           19 k
 compat-libstdc++-33                            x86_64                          3.2.3-72.el7                               CentOS7.3                          191 k
 elfutils-libelf-devel                          x86_64                          0.176-2.el7                                CentOS7.3                           39 k
 fontconfig-devel                               x86_64                          2.13.0-4.3.el7                             CentOS7.3                          138 k
 gcc-c++                                        x86_64                          4.8.5-39.el7                               CentOS7.3                          7.2 M
 ksh                                            x86_64                          20120801-139.el7                           CentOS7.3                          885 k
 libXrender-devel                               x86_64                          0.9.10-1.el7                               CentOS7.3                           17 k
 libaio-devel                                   x86_64                          0.3.109-13.el7                             CentOS7.3                           13 k
 libstdc++-devel                                x86_64                          4.8.5-39.el7                               CentOS7.3                          1.5 M
Installing for dependencies:
 expat-devel                                    x86_64                          2.1.0-10.el7_3                             CentOS7.3                           57 k
 freetype-devel                                 x86_64                          2.8-14.el7                                 CentOS7.3                          447 k
 libX11-devel                                   x86_64                          1.6.7-2.el7                                CentOS7.3                          981 k
 libXau-devel                                   x86_64                          1.0.8-2.1.el7                              CentOS7.3                           14 k
 libpng-devel                                   x86_64                          2:1.5.13-7.el7_2                           CentOS7.3                          122 k
 libsmartcols                                   x86_64                          2.23.2-61.el7_7.1                          CentOS7.3                          141 k
 libuuid-devel                                  x86_64                          2.23.2-61.el7_7.1                          CentOS7.3                           92 k
 libxcb-devel                                   x86_64                          1.13-1.el7                                 CentOS7.3                          1.1 M
 xorg-x11-proto-devel                           noarch                          2018.4-1.el7                               CentOS7.3                          280 k
Updating for dependencies:
 cpp                                            x86_64                          4.8.5-39.el7                               CentOS7.3                          5.9 M
 expat                                          x86_64                          2.1.0-10.el7_3                             CentOS7.3                           81 k
 freetype                                       x86_64                          2.8-14.el7                                 CentOS7.3                          380 k
 gcc                                            x86_64                          4.8.5-39.el7                               CentOS7.3                           16 M
 libX11                                         x86_64                          1.6.7-2.el7                                CentOS7.3                          607 k
 libX11-common                                  noarch                          1.6.7-2.el7                                CentOS7.3                          164 k
 libblkid                                       x86_64                          2.23.2-61.el7_7.1                          CentOS7.3                          181 k
 libgomp                                        x86_64                          4.8.5-39.el7                               CentOS7.3                          158 k
 libmount                                       x86_64                          2.23.2-61.el7_7.1                          CentOS7.3                          183 k
 libuuid                                        x86_64                          2.23.2-61.el7_7.1                          CentOS7.3                           83 k
 util-linux                                     x86_64                          2.23.2-61.el7_7.1                          CentOS7.3                          2.0 M

Transaction Summary
====================================================================================================================================================================
Install  9 Packages (+ 9 Dependent packages)
Upgrade             ( 11 Dependent packages)

Total download size: 39 M
Downloading packages:
No Presto metadata available for CentOS7.3
(1/29): compat-libcap1-1.10-7.el7.x86_64.rpm                                                                                                 |  19 kB  00:00:00     
(2/29): cpp-4.8.5-39.el7.x86_64.rpm                                                                                                          | 5.9 MB  00:00:00     
(3/29): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm                                                                                          | 191 kB  00:00:00     
(4/29): elfutils-libelf-devel-0.176-2.el7.x86_64.rpm                                                                                         |  39 kB  00:00:00     
(5/29): expat-2.1.0-10.el7_3.x86_64.rpm                                                                                                      |  81 kB  00:00:00     
(6/29): fontconfig-devel-2.13.0-4.3.el7.x86_64.rpm                                                                                           | 138 kB  00:00:00     
(7/29): freetype-2.8-14.el7.x86_64.rpm                                                                                                       | 380 kB  00:00:00     
(8/29): expat-devel-2.1.0-10.el7_3.x86_64.rpm                                                                                                |  57 kB  00:00:00     
(9/29): freetype-devel-2.8-14.el7.x86_64.rpm                                                                                                 | 447 kB  00:00:00     
(10/29): gcc-c++-4.8.5-39.el7.x86_64.rpm                                                                                                     | 7.2 MB  00:00:00     
(11/29): ksh-20120801-139.el7.x86_64.rpm                                                                                                     | 885 kB  00:00:00     
(12/29): libX11-1.6.7-2.el7.x86_64.rpm                                                                                                       | 607 kB  00:00:00     
(13/29): libX11-common-1.6.7-2.el7.noarch.rpm                                                                                                | 164 kB  00:00:00     
(14/29): gcc-4.8.5-39.el7.x86_64.rpm                                                                                                         |  16 MB  00:00:02     
(15/29): libXau-devel-1.0.8-2.1.el7.x86_64.rpm                                                                                               |  14 kB  00:00:00     
(16/29): libXrender-devel-0.9.10-1.el7.x86_64.rpm                                                                                            |  17 kB  00:00:00     
(17/29): libaio-devel-0.3.109-13.el7.x86_64.rpm                                                                                              |  13 kB  00:00:00     
(18/29): libblkid-2.23.2-61.el7_7.1.x86_64.rpm                                                                                               | 181 kB  00:00:00     
(19/29): libgomp-4.8.5-39.el7.x86_64.rpm                                                                                                     | 158 kB  00:00:00     
(20/29): libmount-2.23.2-61.el7_7.1.x86_64.rpm                                                                                               | 183 kB  00:00:00     
(21/29): libpng-devel-1.5.13-7.el7_2.x86_64.rpm                                                                                              | 122 kB  00:00:00     
(22/29): libsmartcols-2.23.2-61.el7_7.1.x86_64.rpm                                                                                           | 141 kB  00:00:00     
(23/29): libX11-devel-1.6.7-2.el7.x86_64.rpm                                                                                                 | 981 kB  00:00:00     
(24/29): libuuid-2.23.2-61.el7_7.1.x86_64.rpm                                                                                                |  83 kB  00:00:00     
(25/29): libstdc++-devel-4.8.5-39.el7.x86_64.rpm                                                                                             | 1.5 MB  00:00:00     
(26/29): libuuid-devel-2.23.2-61.el7_7.1.x86_64.rpm                                                                                          |  92 kB  00:00:00     
(27/29): libxcb-devel-1.13-1.el7.x86_64.rpm                                                                                                  | 1.1 MB  00:00:00     
(28/29): xorg-x11-proto-devel-2018.4-1.el7.noarch.rpm                                                                                        | 280 kB  00:00:00     
(29/29): util-linux-2.23.2-61.el7_7.1.x86_64.rpm                                                                                             | 2.0 MB  00:00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                13 MB/s |  39 MB  00:00:02     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libuuid-2.23.2-61.el7_7.1.x86_64                                                                                                                1/40 
  Installing : xorg-x11-proto-devel-2018.4-1.el7.noarch                                                                                                        2/40 
  Updating   : libblkid-2.23.2-61.el7_7.1.x86_64                                                                                                               3/40 
  Updating   : libmount-2.23.2-61.el7_7.1.x86_64                                                                                                               4/40 
  Installing : libXau-devel-1.0.8-2.1.el7.x86_64                                                                                                               5/40 
  Installing : libxcb-devel-1.13-1.el7.x86_64                                                                                                                  6/40 
  Installing : libuuid-devel-2.23.2-61.el7_7.1.x86_64                                                                                                          7/40 
  Updating   : expat-2.1.0-10.el7_3.x86_64                                                                                                                     8/40 
  Installing : expat-devel-2.1.0-10.el7_3.x86_64                                                                                                               9/40 
  Installing : libsmartcols-2.23.2-61.el7_7.1.x86_64                                                                                                          10/40 
  Updating   : libX11-common-1.6.7-2.el7.noarch                                                                                                               11/40 
  Updating   : libX11-1.6.7-2.el7.x86_64                                                                                                                      12/40 
  Installing : libX11-devel-1.6.7-2.el7.x86_64                                                                                                                13/40 
  Installing : libstdc++-devel-4.8.5-39.el7.x86_64                                                                                                            14/40 
  Updating   : libgomp-4.8.5-39.el7.x86_64                                                                                                                    15/40 
  Updating   : cpp-4.8.5-39.el7.x86_64                                                                                                                        16/40 
  Updating   : gcc-4.8.5-39.el7.x86_64                                                                                                                        17/40 
  Updating   : freetype-2.8-14.el7.x86_64                                                                                                                     18/40 
  Installing : 2:libpng-devel-1.5.13-7.el7_2.x86_64                                                                                                           19/40 
  Installing : freetype-devel-2.8-14.el7.x86_64                                                                                                               20/40 
  Installing : fontconfig-devel-2.13.0-4.3.el7.x86_64                                                                                                         21/40 
  Installing : gcc-c++-4.8.5-39.el7.x86_64                                                                                                                    22/40 
  Installing : libXrender-devel-0.9.10-1.el7.x86_64                                                                                                           23/40 
  Updating   : util-linux-2.23.2-61.el7_7.1.x86_64                                                                                                            24/40 
  Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                                                                        25/40 
  Installing : libaio-devel-0.3.109-13.el7.x86_64                                                                                                             26/40 
  Installing : compat-libcap1-1.10-7.el7.x86_64                                                                                                               27/40 
  Installing : elfutils-libelf-devel-0.176-2.el7.x86_64                                                                                                       28/40 
  Installing : ksh-20120801-139.el7.x86_64                                                                                                                    29/40 
  Cleanup    : util-linux-2.23.2-33.el7.x86_64                                                                                                                30/40 
  Cleanup    : libmount-2.23.2-33.el7.x86_64                                                                                                                  31/40 
  Cleanup    : gcc-4.8.5-36.el7_6.2.x86_64                                                                                                                    32/40 
  Cleanup    : libblkid-2.23.2-33.el7.x86_64                                                                                                                  33/40 
  Cleanup    : libX11-1.6.5-2.el7.x86_64                                                                                                                      34/40 
  Cleanup    : libX11-common-1.6.5-2.el7.noarch                                                                                                               35/40 
  Cleanup    : libuuid-2.23.2-33.el7.x86_64                                                                                                                   36/40 
  Cleanup    : cpp-4.8.5-36.el7_6.2.x86_64                                                                                                                    37/40 
  Cleanup    : libgomp-4.8.5-36.el7_6.2.x86_64                                                                                                                38/40 
  Cleanup    : expat-2.1.0-8.el7.x86_64                                                                                                                       39/40 
  Cleanup    : freetype-2.8-12.el7_6.1.x86_64                                                                                                                 40/40 
  Verifying  : util-linux-2.23.2-61.el7_7.1.x86_64                                                                                                             1/40 
  Verifying  : 2:libpng-devel-1.5.13-7.el7_2.x86_64                                                                                                            2/40 
  Verifying  : xorg-x11-proto-devel-2018.4-1.el7.noarch                                                                                                        3/40 
  Verifying  : gcc-4.8.5-39.el7.x86_64                                                                                                                         4/40 
  Verifying  : freetype-2.8-14.el7.x86_64                                                                                                                      5/40 
  Verifying  : expat-devel-2.1.0-10.el7_3.x86_64                                                                                                               6/40 
  Verifying  : fontconfig-devel-2.13.0-4.3.el7.x86_64                                                                                                          7/40 
  Verifying  : cpp-4.8.5-39.el7.x86_64                                                                                                                         8/40 
  Verifying  : libuuid-2.23.2-61.el7_7.1.x86_64                                                                                                                9/40 
  Verifying  : libgomp-4.8.5-39.el7.x86_64                                                                                                                    10/40 
  Verifying  : freetype-devel-2.8-14.el7.x86_64                                                                                                               11/40 
  Verifying  : libX11-1.6.7-2.el7.x86_64                                                                                                                      12/40 
  Verifying  : libstdc++-devel-4.8.5-39.el7.x86_64                                                                                                            13/40 
  Verifying  : libX11-common-1.6.7-2.el7.noarch                                                                                                               14/40 
  Verifying  : libXrender-devel-0.9.10-1.el7.x86_64                                                                                                           15/40 
  Verifying  : ksh-20120801-139.el7.x86_64                                                                                                                    16/40 
  Verifying  : libmount-2.23.2-61.el7_7.1.x86_64                                                                                                              17/40 
  Verifying  : gcc-c++-4.8.5-39.el7.x86_64                                                                                                                    18/40 
  Verifying  : elfutils-libelf-devel-0.176-2.el7.x86_64                                                                                                       19/40 
  Verifying  : compat-libcap1-1.10-7.el7.x86_64                                                                                                               20/40 
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                                                                                             21/40 
  Verifying  : libuuid-devel-2.23.2-61.el7_7.1.x86_64                                                                                                         22/40 
  Verifying  : libxcb-devel-1.13-1.el7.x86_64                                                                                                                 23/40 
  Verifying  : libsmartcols-2.23.2-61.el7_7.1.x86_64                                                                                                          24/40 
  Verifying  : libX11-devel-1.6.7-2.el7.x86_64                                                                                                                25/40 
  Verifying  : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                                                                        26/40 
  Verifying  : libblkid-2.23.2-61.el7_7.1.x86_64                                                                                                              27/40 
  Verifying  : expat-2.1.0-10.el7_3.x86_64                                                                                                                    28/40 
  Verifying  : libXau-devel-1.0.8-2.1.el7.x86_64                                                                                                              29/40 
  Verifying  : libblkid-2.23.2-33.el7.x86_64                                                                                                                  30/40 
  Verifying  : libX11-common-1.6.5-2.el7.noarch                                                                                                               31/40 
  Verifying  : expat-2.1.0-8.el7.x86_64                                                                                                                       32/40 
  Verifying  : libgomp-4.8.5-36.el7_6.2.x86_64                                                                                                                33/40 
  Verifying  : libuuid-2.23.2-33.el7.x86_64                                                                                                                   34/40 
  Verifying  : libX11-1.6.5-2.el7.x86_64                                                                                                                      35/40 
  Verifying  : libmount-2.23.2-33.el7.x86_64                                                                                                                  36/40 
  Verifying  : gcc-4.8.5-36.el7_6.2.x86_64                                                                                                                    37/40 
  Verifying  : freetype-2.8-12.el7_6.1.x86_64                                                                                                                 38/40 
  Verifying  : util-linux-2.23.2-33.el7.x86_64                                                                                                                39/40 
  Verifying  : cpp-4.8.5-36.el7_6.2.x86_64                                                                                                                    40/40 
file:///mnt/repodata/bc7372b8befa9b51b26a8a998ca89b5be3e5636e30546b1e3f11d198d7bed64d-productid.gz: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/bc7372b8befa9b51b26a8a998ca89b5be3e5636e30546b1e3f11d198d7bed64d-productid.gz"
Trying other mirror.

Installed:
  compat-libcap1.x86_64 0:1.10-7.el7                   compat-libstdc++-33.x86_64 0:3.2.3-72.el7             elfutils-libelf-devel.x86_64 0:0.176-2.el7            
  fontconfig-devel.x86_64 0:2.13.0-4.3.el7             gcc-c++.x86_64 0:4.8.5-39.el7                         ksh.x86_64 0:20120801-139.el7                         
  libXrender-devel.x86_64 0:0.9.10-1.el7               libaio-devel.x86_64 0:0.3.109-13.el7                  libstdc++-devel.x86_64 0:4.8.5-39.el7                 

Dependency Installed:
  expat-devel.x86_64 0:2.1.0-10.el7_3        freetype-devel.x86_64 0:2.8-14.el7      libX11-devel.x86_64 0:1.6.7-2.el7        libXau-devel.x86_64 0:1.0.8-2.1.el7
  libpng-devel.x86_64 2:1.5.13-7.el7_2       libsmartcols.x86_64 0:2.23.2-61.el7_7.1 libuuid-devel.x86_64 0:2.23.2-61.el7_7.1 libxcb-devel.x86_64 0:1.13-1.el7   
  xorg-x11-proto-devel.noarch 0:2018.4-1.el7

Dependency Updated:
  cpp.x86_64 0:4.8.5-39.el7                 expat.x86_64 0:2.1.0-10.el7_3            freetype.x86_64 0:2.8-14.el7                gcc.x86_64 0:4.8.5-39.el7          
  libX11.x86_64 0:1.6.7-2.el7               libX11-common.noarch 0:1.6.7-2.el7       libblkid.x86_64 0:2.23.2-61.el7_7.1         libgomp.x86_64 0:4.8.5-39.el7      
  libmount.x86_64 0:2.23.2-61.el7_7.1       libuuid.x86_64 0:2.23.2-61.el7_7.1       util-linux.x86_64 0:2.23.2-61.el7_7.1      

Complete!
[root@host-173-16-87-178 ~]# 

3.3、创建oracle用户组

[root@ywxtdb ~]# groupadd oinstall
[root@ywxtdb ~]# groupadd dba
[root@ywxtdb ~]# groupadd asmdba
[root@ywxtdb ~]# groupadd backupdba
[root@ywxtdb ~]# groupadd dgdba
[root@ywxtdb ~]# groupadd kmdba
[root@ywxtdb ~]# groupadd racdba
[root@ywxtdb ~]# groupadd oper
[root@ywxtdb ~]# 
[root@ywxtdb ~]# useradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper -m oracle

3.4、配置域名解析文件

配置/etc/hosts文件

[root@host-173-16-87-178 ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
173.16.87.178   ywxtdb

3.5、配置系统内核参数

在这里插入图片描述
在这里插入图片描述
通过修改配置文件进行调整参数

[root@host-173-16-87-178 ~]# vi /etc/sysctl.conf 
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 16451328
kernel.shmmax = 33692319744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

#输入sysctl -P使配置生效
[root@host-173-16-87-178 ~]# /sbin/sysctl -p
net.ipv4.ip_no_pmtu_disc = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_keepalive_time = 150
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 6
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 16451328
kernel.shmmax = 33692319744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@host-173-16-87-178 ~]#

3.6、关闭selinux和防火墙

[root@host-173-16-87-178 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

[root@host-173-16-87-178 ~]# 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)
You have mail in /var/spool/mail/root
[root@host-173-16-87-178 ~]# 

3.7、配置用户环境

1、oracle用户环境变量

[root@host-173-16-87-178 ~]# su - oracle
[oracle@ywxtdb ~]$ vi .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.5.0
export PATH=$PATH:$ORACLE_HOME/bin:/usr/local/bin
export ORACLE_HOSTNAME=ywxtdb
export ORACLE_SID=ywxtdb
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/network/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
[root@host-173-16-87-178 ~]# 

#创建oracle安装目录
[root@host-173-16-87-178 ~]# mkdir /u01
[root@host-173-16-87-178 ~]# chmod 777 /u01

2、修改用户的Shell限制

[root@host-173-16-87-178 ~]# vi /etc/security/limits.conf 
# /etc/security/limits.conf
#
#This file sets the resource limits for the users logged in via PAM.
#It does not affect resource limits of the system services.
#
#Also note that configuration files in /etc/security/limits.d directory,
#which are read in alphabetical order, override the settings in this
#file in case the domain is the same or more specific.
#That means for example that setting a limit for wildcard domain here
#can be overriden with a wildcard setting in a config file in the
#subdirectory, but a user specific setting here can be overriden only
#with a user specific setting in the subdirectory.
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - a user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open file descriptors
"/etc/security/limits.conf" 67L, 2542C
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open file descriptors
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

# End of file
# Set Oracle Database Server
@oinstall soft nofile 2048
@oinstall hard nofile 65536
@oinstall soft nproc 16384
@oinstall soft stack 10240
"/etc/security/limits.conf" 73L, 2681C written
[root@host-173-16-87-178 ~]# 

二、安装

1、解压安装包

[root@ywxtdb soft]# mkdir -p /u01/app/oracle/product/19.5.0
[root@ywxtdb soft]# unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME

2、方式一:图形界面

通过vnc工具连接到linux图形界面

[root@ywxtdb ~]# chown -R oracle:oinstall /soft/database/
[root@ywxtdb ~]# exit
logout
[oracle@ywxtdb database]$ ./runInstaller 

1)下一步
在这里插入图片描述
2)单实例数据库安装,下一步
在这里插入图片描述
3)企业版,下一步
在这里插入图片描述
4)下一步
在这里插入图片描述
5)下一步
在这里插入图片描述
6)下一步
在这里插入图片描述
7)下一步
在这里插入图片描述
在这里插入图片描述
8)执行先决条件检查
在这里插入图片描述
yum执行安装kmod

[root@ywxtdb ~]# yum install kmod kmod-libs
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
file:///mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/repomd.xml"
Trying other mirror.
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package kmod.x86_64 0:20-9.el7 will be updated
---> Package kmod.x86_64 0:20-25.el7 will be an update
---> Package kmod-libs.x86_64 0:20-9.el7 will be updated
---> Package kmod-libs.x86_64 0:20-25.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
 Package                                 Arch                                 Version                                 Repository                               Size
====================================================================================================================================================================
Updating:
 kmod                                    x86_64                               20-25.el7                               CentOS7.3                               122 k
 kmod-libs                               x86_64                               20-25.el7                               CentOS7.3                                51 k

Transaction Summary
====================================================================================================================================================================
Upgrade  2 Packages

Total size: 173 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : kmod-libs-20-25.el7.x86_64                                                                                                                       1/4 
  Updating   : kmod-20-25.el7.x86_64                                                                                                                            2/4 
  Cleanup    : kmod-libs-20-9.el7.x86_64                                                                                                                        3/4 
  Cleanup    : kmod-20-9.el7.x86_64                                                                                                                             4/4 
  Verifying  : kmod-20-25.el7.x86_64                                                                                                                            1/4 
  Verifying  : kmod-libs-20-25.el7.x86_64                                                                                                                       2/4 
  Verifying  : kmod-20-9.el7.x86_64                                                                                                                             3/4 
  Verifying  : kmod-libs-20-9.el7.x86_64                                                                                                                        4/4 
file:///mnt/repodata/bc7372b8befa9b51b26a8a998ca89b5be3e5636e30546b1e3f11d198d7bed64d-productid.gz: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/bc7372b8befa9b51b26a8a998ca89b5be3e5636e30546b1e3f11d198d7bed64d-productid.gz"
Trying other mirror.

Updated:
  kmod.x86_64 0:20-25.el7                                                        kmod-libs.x86_64 0:20-25.el7                                                       

Complete!
[root@ywxtdb ~]# 

重新检查后,勾选全部忽略,然后下一步,选择是。
在这里插入图片描述
在这里插入图片描述
9)执行安装
在这里插入图片描述
在这里插入图片描述
10)中间会让我们使用root用户执行两个脚本。
在这里插入图片描述
另外打开一个shell窗口,执行命令,执行完成之后返回图形界面点击确定。

[root@ywxtdb ~]# /u01/app/oraInventory/orainstRoot.sh
更改权限/u01/app/oraInventory.
添加组的读取和写入权限。
删除全局的读取, 写入和执行权限。

更改组名/u01/app/oraInventory 到 oinstall.
脚本的执行已完成。
[root@ywxtdb ~]# /u01/app/oracle/product/19.5.0/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /soft/database

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Oracle Trace File Analyzer (TFA - Standalone Mode) is available at :
    /soft/database/bin/tfactl

Note :
1. tfactl will use TFA Service if that service is running and user has been granted access
2. tfactl will configure TFA Standalone Mode only if user has no access to TFA Service or TFA is not installed

[root@ywxtdb ~]# 

在这里插入图片描述
11、至此oracle软件安装完成。

3、方式二:命令行静默安装

3.1配置响应文件

#备份
[oracle@zbglxtdb response]$ cd $ORACLE_HOME/install/response
[oracle@zbglxtdb response]$ cp db_install.rsp db_install.rsp.bak

#编辑db_install.rsp
[oracle@zbglxtdb response]$ vi db_install.rsp
主要是修改以下参数
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_HOME=/u01/app/oracle/product/19.5.0
ORACLE_BASE=/u01/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

3.2执行安装

[oracle@zbglxtdb 19.5.0]$ ./runInstaller -silent -responseFile /u01/app/oracle/product/19.5.0/install/response/db_install.rsp
Launching Oracle Database Setup Wizard...

[FATAL] [INS-13013] Target environment does not meet some mandatory requirements.
   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /tmp/InstallActions2020-03-07_11-40-55AM/installActions2020-03-07_11-40-55AM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /tmp/InstallActions2020-03-07_11-40-55AM/installActions2020-03-07_11-40-55AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2020-03-07_11-40-55AM
[oracle@zbglxtdb 19.5.0]$

发现安装报错,通过查看日志搜索/failed发现报错是权限问题,更改systemctl的权限之后重新执行安装成功。

查看报错日志
[root@zbglxtdb ~]#
[root@zbglxtdb ~]# more /tmp/InstallActions2020-03-07_11-40-55AM/installActions2020-03-07_11-40-55AM.log
/failed
...skipping
INFO:  [Mar 7, 2020 11:41:04 AM] FINE: [VerificationCommand.execute:387]  
Output: '<CV_VRES>126</CV_VRES><CV_ERES>0</CV_ERES><INITCMD>/tmp/InstallActions2020-03-07_11-40-55AM/CVU_19.0.0.0.0_oracle/exectask -getrunlevel </INITCMD><HOST>zbg
lxtdb</HOST><ERROR_LOG><ERR_DESC><ENTITY>GLOBAL</ENTITY><ERR_CMD><CMD>/bin/systemctl get-default</CMD><OUT>sh: /bin/systemctl: Permission denied
</OUT><STAT>126</STAT><ERR_LOC>CVU00367</ERR_LOC></ERR_CMD></ERR_DESC></ERROR_LOG><INFO_LOG><INFO>Exectask: Run level retrieval failed</INFO></INFO_LOG>'
INFO:  [Mar 7, 2020 11:41:04 AM] ERROR: [Result.addErrorDescription:760]  PRVG-2043 : Command "/bin/systemctl get-default" failed on node "zbglxtdb" and produced th
e following output:
sh: /bin/systemctl: Permission denied

INFO:  [Mar 7, 2020 11:41:04 AM] ERROR: [Result.addErrorDescription:771]  PRVG-2043 : Command "/bin/systemctl get-default" failed on node "zbglxtdb" and produced th
e following output:
sh: /bin/systemctl: Permission denied

INFO:  [Mar 7, 2020 11:41:04 AM] INFO: [Task.perform:768]  
TaskArchitecture:Architecture[CHECK_ARCHITECTURE]:TASK_START
INFO:  [Mar 7, 2020 11:41:04 AM] INFO: [Task.perform:789]  
m_nodeList='zbglxtdb'
INFO:  [Mar 7, 2020 11:41:04 AM] FINE: [VerificationCommand.execute:387]
[root@zbglxtdb ~]#
[root@zbglxtdb ~]#

#根据报错提示是systemctl没有权限,查看系统该文件的权限发现确实其它用户没有权限,重新授权后再执行没有报错。

[root@zbglxtdb ~]# ls -l  /bin/systemctl
-rwxr--r--. 1 root root 637680 Nov  7  2016 /bin/systemctl
[root@zbglxtdb ~]# chmod 755 /bin/systemctl
[oracle@zbglxtdb 19.5.0]$ ./runInstaller -silent -responseFile /u01/app/oracle/product/19.5.0/install/response/db_install.rsp
Launching Oracle Database Setup Wizard...

[WARNING] [INS-32047] The location (/u01/app/oraInventory) specified for the central inventory is not empty.
   ACTION: It is recommended to provide an empty location for the inventory.
The response file for this session can be found at:
 /u01/app/oracle/product/19.5.0/install/response/db_2020-03-07_12-56-18PM.rsp

You can find the log of this install session at:
 /tmp/InstallActions2020-03-07_12-56-18PM/installActions2020-03-07_12-56-18PM.log

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh
        2. /u01/app/oracle/product/19.5.0/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes: 
[zbglxtdb]
Execute /u01/app/oracle/product/19.5.0/root.sh on the following nodes: 
[zbglxtdb]


Successfully Setup Software.
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2020-03-07_12-56-18PM
[oracle@zbglxtdb 19.5.0]$ 

3.3根据提示使用root用户执行脚本完成安装

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

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@zbglxtdb ~]# /u01/app/oracle/product/19.5.0/root.sh
Check /u01/app/oracle/product/19.5.0/install/root_zbglxtdb_2020-03-07_12-57-48-400665768.log for the output of root script
[root@zbglxtdb ~]# 

查看相关日志如果没有错误,oracle软件安装就已经完成了,之后参下考面的静默方式完成建库操作。

三、创建数据库实例

1、方式一:图形界面创建

1)配置监听

oracle用户执行
[oracle@ywxtdb ~]$ netca
在这里插入图片描述
LISTENER
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

2)创建数据库

以oracle用户运行dbca
[oracle@ywxtdb ~]$ dbca
在这里插入图片描述
高级配置
在这里插入图片描述
下一步
在这里插入图片描述
配置oracle实例名称,根据自己的需要选择是否创建成容器数据库。不需要的话就取消
在这里插入图片描述
下一步
在这里插入图片描述
根据实际需要开启归档和闪回区在这里插入图片描述
下一步
在这里插入图片描述
在这里插入图片描述
设置内存大小
在这里插入图片描述
设置字符集
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
至此oracle安装和建库已经完成,可以使用数据库了

2、方式二:命令行静默创建

相应模板存放位置

软件/u01/app/oracle/product/19.5.0/install/response/db_install.rsp
监听/u01/app/oracle/product/19.5.0/assistants/netca/netca.rsp
建库/u01/app/oracle/product/19.5.0/assistants/dbca/dbca.rsp

1)配置监听

执行以下命令通过netca.rsp文件创建监听

[oracle@zbglxtdb netca]$ netca /silent /responseFile /u01/app/oracle/product/19.5.0/assistants/netca/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /u01/app/oracle/product/19.5.0/assistants/netca/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /u01/app/oracle/product/19.5.0/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@zbglxtdb netca]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 07-3-2020 14:29:27

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zbglxtdb)(PORT=1521)))
LISTENER 的 STATUS
------------------------
别名                      LISTENER
版本                      TNSLSNR for Linux: Version 19.0.0.0.0 - Production
启动日期                  07-3-2020 14:29:20
正常运行时间              00 小时 06 秒
跟踪级别                  off
安全性                    ON: Local OS Authentication
SNMP                      OFF
监听程序参数文件          /u01/app/oracle/product/19.5.0/network/admin/listener.ora
监听程序日志文件          /u01/app/oracle/diag/tnslsnr/zbglxtdb/listener/alert/log.xml
监听端点概要...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=zbglxtdb)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
监听程序不支持服务
命令执行成功
[oracle@zbglxtdb netca]$ 

1)创建数据库

编辑响应文件

[oracle@zbglxtdb ~]$ /u01/app/oracle/product/19.5.0/assistants/dbca
[oracle@zbglxtdb dbca]$ cp dbca.rsp dbca.rsp.bak
[oracle@zbglxtdb dbca]$ vi dbca.rsp
#主要修改以下参数
gdbName=zbglxtdb
sid=zbglxtdb
databaseConfigType=SI
templateName=General_Purpose.dbc
sysPassword=“password”
systemPassword=“passowrd”
emConfiguration=DBEXPRESS
dbsnmpPassword=“password”
datafileDestination=/u01/app/oracle/oradata
characterSet=AL32UTF8
totalMemory=8192

#如果要创建容器数据库,则还需要配置以下参数,如果是多个pdb则以pdbname为前缀
createAsContainerDatabase=true
numberOfPDBs=1
pdbName=yhggi
pdbAdminPassword=password

执行安装

[oracle@zbglxtdb dbca]$ dbca -silent -createDatabase -responseFile /u01/app/oracle/product/19.5.0/assistants/dbca/dbca.rsp
Prepare for db operation
10% complete
Copying database files
40% complete
Creating and starting Oracle instance
42% complete
46% complete
50% complete
54% complete
60% complete
Completing Database Creation
66% complete
69% complete
70% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/zbglxtdb.
Database Information:
Global Database Name:zbglxtdb
System Identifier(SID):zbglxtdb
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/zbglxtdb/zbglxtdb.log" for further details.
[oracle@zbglxtdb dbca]$ 

安装完成。

3、检查

[oracle@ywxtdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Mar 6 21:53:54 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


???: 
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> 

发现有乱码,需要修改客户端的字符集

[oracle@ywxtdb ~]$vi .bash_profile            #添加下面这行后重新应用生效即可。
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"

".bash_profile" 21L, 623C written                                                                                                                 
[oracle@ywxtdb ~]$ source .bash_profile 
[oracle@ywxtdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on 星期五 36 21:56:33 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


连接到: 
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> 
SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
ywxtdb           OPEN

SQL> exit           
从 Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0 断开
[oracle@ywxtdb ~]$

备注:在安装过程中出现DBT-11218错误,继续往下的话会报ORA-27104错误,这是因为内核参数设置错误,建议将以下两个参数进行调整。
kernel.shmall:控制共享内存页数,该参数大小为物理内存除以pagesize
kernel.shmmax:设置为实际物理内存的2/3或者物理内存的一半

其它内核参数说明:

shmmax=物理内存*80%*80%,单位是字节
kernel.shmmax:表示单个共享内存段的最大值,以字节为单位,此值一般为物理内存的一半,不过大一点也没关系,这里设定的为4GB,即“4294967295/1024/1024/1024=4G”。
kernel.shmmin:表示单个共享内存段的最小值,默认为1byte
kernel.shmall:表示整个系统范围内可用共享内存页的总量,单位是页(page),在32位系统上一页等于4kB,也就是4096字节。计算公式是:shmmax/PAGE_SIZE
kernel.shmmni:表示整个系统范围内内存段的最大数量,一般为4096.
ip_local_port_range :表示端口的范围。在监听器帮助客户端进程和服务器进程建立连接时,会用到指定范围内的端口。
kernel.sem :表示设置的信号量,这4个参数内容大小固定。
net.core.rmem_default :表示接收套接字缓冲区大小的缺省值(以字节为单位)。
net.core.rmem_max :表示接收套接字缓冲区大小的最大值(以字节为单位)
net.core.wmem_default :表示发送套接字缓冲区大小的缺省值(以字节为单位)。
net.core.wmem_max :表示发送套接字缓冲区大小的最大值(以字节为单位)。

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐