In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "how to deploy Oracle 19c based on docker". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to deploy Oracle 19c based on docker" can help you solve your doubts.
one。 Pull Oracle 19c image [root@node08002 docker] # docker pull registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c19c: Pulling from zhuyijun/oraclebce8f778fef0: Pull complete 3fc3fd32c0bc: Pull complete 02948dd6d654: Pull complete 67f2dfeb2f1b: Pull complete 2e42d8039fd9: Pull complete b94f01bb60c6: Pull complete Digest: sha256:3898a9394720f30ce7f0b83ef2d172f4cd11b958282e0505f83cf2b0e5eaf7d4Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19cregistry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c II. View the image [root@node08002 docker] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEregistry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle 19c 7b5eb4597688 20 months ago 6.61GB [root@node08002 docker] # III. Create Container 3.1 for Oracle 19c Image 3.1 create directory [root@node08002 docker] # mkdir / opt/oradata [root@node08002 docker] # chmod-R 777 / opt/oradata/ [root@node08002 docker] # 3.2 create instance [root@node08002 docker] # docker run-d-it-- name oracle19c-p 1521 opt/oradata 1521-p 5500 opt/oradata 5500-v / opt/oradata:/opt/oracle/oradata registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c3.3 View logs [ Root@node08002 ~] # docker logs-f oracle19cORACLE EDITION: ENTERPRISEORACLE PASSWORD FOR SYS SYSTEM AND PDBADMIN: CRiP1dWzDHA=1 LSNRCTL for Linux: Version 19.0.0.0.0-Production on 06-APR-2022 10:28:18Copyright (c) 1991, 2019, Oracle. All rights reserved.Starting / opt/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 19.0.0.0.0-ProductionSystem parameter file is / opt/oracle/product/19c/dbhome_1/network/admin/listener.oraLog messages written to / opt/oracle/diag/tnslsnr/1249a4a7bb32/listener/alert/log.xmlListening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=EXTPROC1)) Listening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp)) (HOST=0.0.0. 0) (PORT=1521)) Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=EXTPROC1)) STATUS of the LISTENER----Alias LISTENERVersion TNSLSNR for Linux: Version 19.0.0.0.0-ProductionStart Date 06-APR-2022 10:28:18Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File / opt/oracle/product/19c/dbhome_1/network/admin/listener.oraListener Log File / opt/oracle/diag/tnslsnr/1249a4a7bb32/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=EXTPROC1) (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=0.0.0.0) (PORT=1521) The listener supports no servicesThe command completed successfullyPrepare for db operation8% completeCopying database files31% completeCreating and starting Oracle instance32% complete36% complete40% complete43% complete46% completeCompleting Database Creation51% complete54% completeCreating Pluggable Databases58% complete77% completeExecuting Post Configuration Actions100% completeDatabase creation complete. For details check the logfiles at: / opt/oracle/cfgtoollogs/dbca/ORCLCDB.Database Information:Global Database Name:ORCLCDBSystem Identifier (SID): ORCLCDBLook at the logfile "/ opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.SQL*Plus: Release 19.0.0.0.0-Production on Wed Apr 6 10:48:37 2022Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved. IV. Change the password
Change the default system password of the system to oracle
[root@node08002 ~] # docker exec oracle19c. / setPassword.sh oracle
The setPassword.sh script is [root@node08002 ~] # docker exec-it oracle19c / bin/bash [oracle@1249a4a7bb32 ~] $lssetPassword.sh [oracle@1249a4a7bb32 ~] $pwd/home/oracle [oracle@1249a4a7bb32 ~] $cat setPassword.sh #! / bin/bash# LICENSE UPL 1.0 script # Copyright (c) 1982-2018 Oracle and/or its affiliates. All rights reserved.# # Since: November, 2018 Author: gerald.venzl@oracle.com# Description: Sets the password for sys, system and pdb_admin## DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.# ORACLE_PWD=$1ORACLE_SID= "`grep $ORACLE_HOME / etc/oratab | cut-d:-f1`" ORACLE_PDB= "ls-dl $ORACLE_BASE/oradata/$ORACLE_SID/*/ | grep-v pdbseed | awk'{print $9}'| cut-d /-f6`" ORAENV_ASK=NOsource oraenv sqlplus / as sysdba Show user USER is "SYSTEM" SQL > exitDisconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0-Production [oracle@1249a4a7bb32 ~] $5.2.Test scheme 2: test [root@node08002 ~] # docker exec-it oracle19c / bin/bash [oracle@1249a4a7bb32 ~] $cd / opt/oracle/product/19c/dbhome_1/network/admin/ [oracle @ 1249a4a7bb32 admin] $lslistener.ora samples shrept.lst sqlnet.ora tnsnames.ora [oracle@1249a4a7bb32 admin] $vim sqlnet.ora [oracle] @ 1249a4a7bb32 admin] $cat sqlnet.ora NAME.DIRECTORY_PATH= (TNSNAMES EZCONNECT, HOSTNAME) [oracle@1249a4a7bb32 admin] $vim sqlnet.ora [oracle@1249a4a7bb32 admin] $cat sqlnet.ora NAME.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) HOSTNAME) SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8SQLNET.ALLOWED_LOGON_VERSION_SERVER= 8 [Oracle @ 1249a4a7bb32 admin] $exitexit [root@node08002 ~] # docker ps-aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES1249a4a7bb32 registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c "/ bin/sh-c 'exec $O …" 16 hours ago Up 16 hours (healthy) 0.0.0.0 1521/tcp 1521-> 1521/tcp,:: 1521-> 1521/tcp, 0.0.0.0 healthy 5500-> 5500/tcp,:: 5500-> 5500/tcp oracle19c [root@node08002 ~] # docker restart oracle19coracle19c [root@node08002 ~] #
It is strange that you have to change the password again. The specific steps are as follows:
[root@node08002] # docker exec-it oracle19c / bin/bash [oracle@1249a4a7bb32 ~] $sqlplus system/oracle@localhost:1521/ORCLCDB SQL*Plus: Release 19.0.0.0.0-Production on Thu Apr 7 02:59:52 2022Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Last Successful login time: Thu Apr 07 2022 02:59:10 + 00:00 Connected to:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0-ProductionVersion 19.3.0.0.0 SQL > alter user system identified by oracle; User altered. SQL > exitDisconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0-ProductionVersion 19.3.0.0.0
We can finally connect.
After reading this, the article "how to deploy Oracle 19c based on docker" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.