<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
[root@node08002 docker]# docker pull registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c 19c: Pulling from zhuyijun/oracle bce8f778fef0: Pull complete 3fc3fd32c0bc: Pull complete 02948dd6d654: Pull complete 67f2dfeb2f1b: Pull complete 2e42d8039fd9: Pull complete b94f01bb60c6: Pull complete Digest: sha256:3898a9394720f30ce7f0b83ef2d172f4cd11b958282e0505f83cf2b0e5eaf7d4 Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
[root@node08002 docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle 19c 7b5eb4597688 20 months ago 6.61GB [root@node08002 docker]#
[root@node08002 docker]# mkdir /opt/oradata [root@node08002 docker]# chmod -R 777 /opt/oradata/ [root@node08002 docker]#
[root@node08002 docker]# docker run -d -it --name oracle19c -p 1521:1521 -p 5500:5500 -v /opt/oradata:/opt/oracle/oradata registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
[root@node08002 ~]# docker logs -f oracle19c ORACLE EDITION: ENTERPRISE ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: CRiP1dWzDHA=1 LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 06-APR-2022 10:28:18 Copyright (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 - Production System parameter file is /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora Log messages written to /opt/oracle/diag/tnslsnr/1249a4a7bb32/listener/alert/log.xml Listening 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 LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 06-APR-2022 10:28:18 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora Listener Log File /opt/oracle/diag/tnslsnr/1249a4a7bb32/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) The listener supports no services The command completed successfully 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. SQL*Plus: Release 19.0.0.0.0 - Production on Wed Apr 6 10:48:37 2022 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved.
系統預設的system密碼修改成oracle
[root@node08002 ~]# docker exec oracle19c ./setPassword.sh oracle
setPassword.sh 指令碼如下
[root@node08002 ~]# docker exec -it oracle19c /bin/bash [oracle@1249a4a7bb32 ~]$ ls setPassword.sh [oracle@1249a4a7bb32 ~]$ pwd /home/oracle [oracle@1249a4a7bb32 ~]$ cat setPassword.sh #!/bin/bash # LICENSE UPL 1.0 # # Copyright (c) 1982-2018 Oracle and/or its affiliates. All rights reserved. # # Since: November, 2016 # 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=$1 ORACLE_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=NO source oraenv sqlplus / as sysdba << EOF ALTER USER SYS IDENTIFIED BY "$ORACLE_PWD"; ALTER USER SYSTEM IDENTIFIED BY "$ORACLE_PWD"; ALTER SESSION SET CONTAINER=$ORACLE_PDB; ALTER USER PDBADMIN IDENTIFIED BY "$ORACLE_PWD"; exit; EOF [oracle@1249a4a7bb32 ~]$
sqlplus system/oracle@xxx.xxx.xxx.xxx:1521/ORCLCDB
[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 01:54:17 2022 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Last Successful login time: Thu Apr 07 2022 01:53:14 +00:00 Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production SQL> Show user; USER is "SYSTEM" SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production [oracle@1249a4a7bb32 ~]$
[root@node08002 ~]# docker exec -it oracle19c /bin/bash [oracle@1249a4a7bb32 ~]$ cd /opt/oracle/product/19c/dbhome_1/network/admin/ [oracle@1249a4a7bb32 admin]$ ls listener.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=8 SQLNET.ALLOWED_LOGON_VERSION_SERVER=8 [oracle@1249a4a7bb32 admin]$ exit exit [root@node08002 ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1249a4a7bb32 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->1521/tcp, :::1521->1521/tcp, 0.0.0.0:5500->5500/tcp, :::5500->5500/tcp oracle19c [root@node08002 ~]# docker restart oracle19c oracle19c [root@node08002 ~]#
很奇怪,又要修改一次密碼,具體操作步驟如下:
[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 2022 Version 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 - Production Version 19.3.0.0.0 SQL> alter user system identified by oracle; User altered. SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0
終於可以連線了
到此這篇關於基於docker部署Oracle 19c的文章就介紹到這了,更多相關docker部署Oracle 19c內容請搜尋it145.com以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援it145.com!
相關文章
<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
综合看Anker超能充系列的性价比很高,并且与不仅和iPhone12/苹果<em>Mac</em>Book很配,而且适合多设备充电需求的日常使用或差旅场景,不管是安卓还是Switch同样也能用得上它,希望这次分享能给准备购入充电器的小伙伴们有所
2021-06-01 09:31:42
除了L4WUDU与吴亦凡已经多次共事,成为了明面上的厂牌成员,吴亦凡还曾带领20XXCLUB全队参加2020年的一场音乐节,这也是20XXCLUB首次全员合照,王嗣尧Turbo、陈彦希Regi、<em>Mac</em> Ova Seas、林渝植等人全部出场。然而让
2021-06-01 09:31:34
目前应用IPFS的机构:1 谷歌<em>浏览器</em>支持IPFS分布式协议 2 万维网 (历史档案博物馆)数据库 3 火狐<em>浏览器</em>支持 IPFS分布式协议 4 EOS 等数字货币数据存储 5 美国国会图书馆,历史资料永久保存在 IPFS 6 加
2021-06-01 09:31:24
开拓者的车机是兼容苹果和<em>安卓</em>,虽然我不怎么用,但确实兼顾了我家人的很多需求:副驾的门板还配有解锁开关,有的时候老婆开车,下车的时候偶尔会忘记解锁,我在副驾驶可以自己开门:第二排设计很好,不仅配置了一个很大的
2021-06-01 09:30:48
不仅是<em>安卓</em>手机,苹果手机的降价力度也是前所未有了,iPhone12也“跳水价”了,发布价是6799元,如今已经跌至5308元,降价幅度超过1400元,最新定价确认了。iPhone12是苹果首款5G手机,同时也是全球首款5nm芯片的智能机,它
2021-06-01 09:30:45