ORACLE 19C RPM单机完整安装过程

举报
Lucifer三思而后行 发表于 2021/10/28 10:00:03 2021/10/28
【摘要】 1.配置网络 nmcli connection modify ens192 ipv4.address 192.168.1.169/24 ipv4.gateway 192.168.1.1 ipv4.method manual autoconnect yes 2.上传软件mkdir /soft##oracle rpm软件安装包,19c preinstall rpm软件安装包[root@rpm1...

1.配置网络

 nmcli connection modify ens192 ipv4.address 192.168.1.169/24 ipv4.gateway 192.168.1.1 ipv4.method manual autoconnect yes

2.上传软件

mkdir /soft
##oracle rpm软件安装包,19c preinstall rpm软件安装包
[root@rpm19c soft]# ll
total 2631532
-rw-r--r--. 1 root root 2694664264 Apr  3 22:40 oracle-database-ee-19c-1.0-1.x86_64.rpm
-rw-r--r--. 1 root root      19552 Apr  3 22:39 oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm

3.配置主机名

hostnamectl set-hostname rpm19c

4.配置地址名解析

cat >> /etc/hosts <<EOF
#Public IP
192.168.1.169	rpm19c
EOF

5.配置yum镜像源

mount /dev/cdrom /mnt
mv /etc/yum.repos.d/* /tmp/

echo "[local]" >> /etc/yum.repos.d/local.repo
echo "name = local" >> /etc/yum.repos.d/local.repo
echo "baseurl = file:///mnt/" >> /etc/yum.repos.d/local.repo
echo "enabled = 1" >> /etc/yum.repos.d/local.repo
echo "gpgcheck = 0" >> /etc/yum.repos.d/local.repo
 
yum clean all
yum repolist all

6.安装19c preinstall rpm,主要是安装一些依赖

[root@rpm19c soft]# yum -y localinstall /soft/oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Examining /soft/oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm: oracle-database-preinstall-19c-1.0-2.el7.x86_64
Marking /soft/oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm to be installed
Resolving Dependencies
...
Installing:
 oracle-database-preinstall-19c        x86_64        1.0-2.el7                             /oracle-database-preinstall-19c-1.0-2.el7.x86_64         56 k
Installing for dependencies:
 GeoIP                                 x86_64        1.5.0-14.el7                          local                                                   1.5 M
 bind-libs                             x86_64        32:9.11.4-26.P2.el7                   local                                                   156 k
 bind-libs-lite                        x86_64        32:9.11.4-26.P2.el7                   local                                                   1.1 M
 bind-license                          noarch        32:9.11.4-26.P2.el7                   local                                                    90 k
 bind-utils                            x86_64        32:9.11.4-26.P2.el7                   local                                                   260 k
 compat-libcap1                        x86_64        1.10-7.el7                            local                                                    19 k
 geoipupdate                           x86_64        2.5.0-1.el7                           local                                                    35 k
 glibc-devel                           x86_64        2.17-317.el7                          local                                                   1.1 M
 glibc-headers                         x86_64        2.17-317.el7                          local                                                   690 k
 gssproxy                              x86_64        0.7.0-29.el7                          local                                                   111 k
 kernel-headers                        x86_64        3.10.0-1160.el7                       local                                                   9.0 M
 keyutils                              x86_64        1.5.8-3.el7                           local                                                    54 k
 ksh                                   x86_64        20120801-142.el7                      local                                                   884 k
 libICE                                x86_64        1.0.9-9.el7                           local                                                    66 k
 libSM                                 x86_64        1.2.2-2.el7                           local                                                    39 k
 libX11                                x86_64        1.6.7-2.el7                           local                                                   607 k
 libX11-common                         noarch        1.6.7-2.el7                           local                                                   164 k
 libXau                                x86_64        1.0.8-2.1.el7                         local                                                    29 k
 libXext                               x86_64        1.3.3-3.el7                           local                                                    39 k
 libXi                                 x86_64        1.7.9-1.el7                           local                                                    40 k
 libXinerama                           x86_64        1.1.3-2.1.el7                         local                                                    14 k
 libXmu                                x86_64        1.1.2-2.el7                           local                                                    71 k
 libXrandr                             x86_64        1.5.1-2.el7                           local                                                    27 k
 libXrender                            x86_64        0.9.10-1.el7                          local                                                    26 k
 libXt                                 x86_64        1.1.5-3.el7                           local                                                   173 k
 libXtst                               x86_64        1.2.3-1.el7                           local                                                    20 k
 libXv                                 x86_64        1.0.11-1.el7                          local                                                    19 k
 libXxf86dga                           x86_64        1.1.4-2.1.el7                         local                                                    19 k
 libXxf86misc                          x86_64        1.0.3-7.1.el7                         local                                                    19 k
 libXxf86vm                            x86_64        1.1.4-1.el7                           local                                                    18 k
 libaio-devel                          x86_64        0.3.109-13.el7                        local                                                    13 k
 libbasicobjects                       x86_64        0.1.1-32.el7                          local                                                    26 k
 libcollection                         x86_64        0.7.0-32.el7                          local                                                    42 k
 libdmx                                x86_64        1.1.3-3.el7                           local                                                    16 k
 libevent                              x86_64        2.0.21-4.el7                          local                                                   214 k
 libini_config                         x86_64        1.3.1-32.el7                          local                                                    64 k
 libnfsidmap                           x86_64        0.25-19.el7                           local                                                    50 k
 libpath_utils                         x86_64        0.2.1-32.el7                          local                                                    28 k
 libref_array                          x86_64        0.1.5-32.el7                          local                                                    27 k
 libstdc++-devel                       x86_64        4.8.5-44.el7                          local                                                   1.5 M
 libtirpc                              x86_64        0.2.4-0.16.el7                        local                                                    89 k
 libverto-libevent                     x86_64        0.2.5-4.el7                           local                                                   8.9 k
 libxcb                                x86_64        1.13-1.el7                            local                                                   214 k
 lm_sensors-libs                       x86_64        3.4.0-8.20160601gitf9185e5.el7        local                                                    42 k
 mailx                                 x86_64        12.5-19.el7                           local                                                   245 k
 net-tools                             x86_64        2.0-0.25.20131004git.el7              local                                                   306 k
 nfs-utils                             x86_64        1:1.3.0-0.68.el7                      local                                                   412 k
 psmisc                                x86_64        22.20-17.el7                          local                                                   141 k
 quota                                 x86_64        1:4.01-19.el7                         local                                                   179 k
 quota-nls                             noarch        1:4.01-19.el7                         local                                                    90 k
 rpcbind                               x86_64        0.2.0-49.el7                          local                                                    60 k
 smartmontools                         x86_64        1:7.0-2.el7                           local                                                   547 k
 sysstat                               x86_64        10.1.5-19.el7                         local                                                   315 k
 tcp_wrappers                          x86_64        7.6-77.el7                            local                                                    79 k
 unzip                                 x86_64        6.0-21.el7                            local                                                   171 k
 xorg-x11-utils                        x86_64        7.5-23.el7                            local                                                   114 k
 xorg-x11-xauth                        x86_64        1:1.0.9-1.el7                         local                                                    30 k

Transaction Summary
=========================================================================================================================================================
Install  1 Package (+57 Dependent packages)

Total size: 21 M
Total download size: 21 M
Installed size: 40 M
。。。。。
Installed:
  oracle-database-preinstall-19c.x86_64 0:1.0-2.el7                                                                                                      

Dependency Installed:
  GeoIP.x86_64 0:1.5.0-14.el7                    bind-libs.x86_64 32:9.11.4-26.P2.el7                       bind-libs-lite.x86_64 32:9.11.4-26.P2.el7   
  bind-license.noarch 32:9.11.4-26.P2.el7        bind-utils.x86_64 32:9.11.4-26.P2.el7                      compat-libcap1.x86_64 0:1.10-7.el7          
  geoipupdate.x86_64 0:2.5.0-1.el7               glibc-devel.x86_64 0:2.17-317.el7                          glibc-headers.x86_64 0:2.17-317.el7         
  gssproxy.x86_64 0:0.7.0-29.el7                 kernel-headers.x86_64 0:3.10.0-1160.el7                    keyutils.x86_64 0:1.5.8-3.el7               
  ksh.x86_64 0:20120801-142.el7                  libICE.x86_64 0:1.0.9-9.el7                                libSM.x86_64 0:1.2.2-2.el7                  
  libX11.x86_64 0:1.6.7-2.el7                    libX11-common.noarch 0:1.6.7-2.el7                         libXau.x86_64 0:1.0.8-2.1.el7               
  libXext.x86_64 0:1.3.3-3.el7                   libXi.x86_64 0:1.7.9-1.el7                                 libXinerama.x86_64 0:1.1.3-2.1.el7          
  libXmu.x86_64 0:1.1.2-2.el7                    libXrandr.x86_64 0:1.5.1-2.el7                             libXrender.x86_64 0:0.9.10-1.el7            
  libXt.x86_64 0:1.1.5-3.el7                     libXtst.x86_64 0:1.2.3-1.el7                               libXv.x86_64 0:1.0.11-1.el7                 
  libXxf86dga.x86_64 0:1.1.4-2.1.el7             libXxf86misc.x86_64 0:1.0.3-7.1.el7                        libXxf86vm.x86_64 0:1.1.4-1.el7             
  libaio-devel.x86_64 0:0.3.109-13.el7           libbasicobjects.x86_64 0:0.1.1-32.el7                      libcollection.x86_64 0:0.7.0-32.el7         
  libdmx.x86_64 0:1.1.3-3.el7                    libevent.x86_64 0:2.0.21-4.el7                             libini_config.x86_64 0:1.3.1-32.el7         
  libnfsidmap.x86_64 0:0.25-19.el7               libpath_utils.x86_64 0:0.2.1-32.el7                        libref_array.x86_64 0:0.1.5-32.el7          
  libstdc++-devel.x86_64 0:4.8.5-44.el7          libtirpc.x86_64 0:0.2.4-0.16.el7                           libverto-libevent.x86_64 0:0.2.5-4.el7      
  libxcb.x86_64 0:1.13-1.el7                     lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7    mailx.x86_64 0:12.5-19.el7                  
  net-tools.x86_64 0:2.0-0.25.20131004git.el7    nfs-utils.x86_64 1:1.3.0-0.68.el7                          psmisc.x86_64 0:22.20-17.el7                
  quota.x86_64 1:4.01-19.el7                     quota-nls.noarch 1:4.01-19.el7                             rpcbind.x86_64 0:0.2.0-49.el7               
  smartmontools.x86_64 1:7.0-2.el7               sysstat.x86_64 0:10.1.5-19.el7                             tcp_wrappers.x86_64 0:7.6-77.el7            
  unzip.x86_64 0:6.0-21.el7                      xorg-x11-utils.x86_64 0:7.5-23.el7                         xorg-x11-xauth.x86_64 1:1.0.9-1.el7         

Complete!

7.安装oracle 19c software rpm

[root@rpm19c soft]# yum -y localinstall /soft/oracle-database-ee-19c-1.0-1.x86_64.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Examining /soft/oracle-database-ee-19c-1.0-1.x86_64.rpm: oracle-database-ee-19c-1.0-1.x86_64
Marking /soft/oracle-database-ee-19c-1.0-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-ee-19c.x86_64 0:1.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================
 Package                                  Arch                     Version                  Repository                                              Size
=========================================================================================================================================================
Installing:
 oracle-database-ee-19c                   x86_64                   1.0-1                    /oracle-database-ee-19c-1.0-1.x86_64                   6.9 G

Transaction Summary
=========================================================================================================================================================
Install  1 Package

Total size: 6.9 G
Installed size: 6.9 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : oracle-database-ee-19c-1.0-1.x86_64                                                                                                   1/1 
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-19c configure
  Verifying  : oracle-database-ee-19c-1.0-1.x86_64                                                                                                   1/1 

Installed:
  oracle-database-ee-19c.x86_64 0:1.0-1                                                                                                                  

Complete!

ORACLE_HOME目录位于:/opt/oracle/product/19c/dbhome_1

8.建库

[root@rpm19c ~]# /etc/init.d/oracledb_ORCLCDB-19c
Usage: /etc/init.d/oracledb_ORCLCDB-19c {start|stop|restart|configure|delete}
[root@rpm19c ~]# /etc/init.d/oracledb_ORCLCDB-19c configure
Configuring Oracle Database ORCLCDB.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/ORCLCDB.
Database Information:
Global Database Name:ORCLCDB
System Identifier(SID):ORCLCDB
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.

Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.

9.设置环境变量

cat <<EOF >>/home/oracle/.bash_profile
umask 022
export TMP=/tmp
export TMPDIR=\$TMP
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/19c/dbhome_1
export TNS_ADMIN=\$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=ORCLCDB
export PATH=/usr/sbin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$ORACLE_HOME/OPatch:\$PATH
EOF

10.连接使用

[oracle@rpm19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Apr 3 23:34:22 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 ORCLPDB1			  READ WRITE NO

总结:

1.只适用于单机

2.无法指定安装目录

3.环境配置太简单(比如防火墙,selinux,环境变量很多都没有配置)

注定无法用于生产环境的安装以及使用,只适合Oracle新手小白体验使用新版19C数据库。

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。