docker orcale 安装过程

    选择打赏方式

0.没有docker怎么办

https://www.runoob.com/docker/windows-docker-install.html

1.下载

搜索oracle-12

QQ20190601-143738@2x.png

QQ20190601-143801@2x.png

下面就是命令后的操作:(你操作还是我操作啊,我来操作吧)

(base) xxzdeMacBook-Pro:~ xxz$ docker pull absolutapps/oracle-12c-ee

Using default tag: latest

latest: Pulling from absolutapps/oracle-12c-ee

a3ed95caeb02: Pull complete 

3f5d218d03fc: Pull complete 

7599fba7a3e8: Pull complete 

fe1149d58656: Pull complete 

d40655be04ce: Pull complete 

03835bd35ad5: Pull complete 

3924faff9c04: Pull complete 

a28a2f0d73a5: Pull complete 

Digest: sha256:390a2166d94ea535ba1f82e293406cd91d0b34f1ecd84addf520d42c58f9bc06

Status: Downloaded newer image for absolutapps/oracle-12c-ee:latest

(base) xxzdeMacBook-Pro:~ xxz$

docker run -d -p 1521:1521 -p 9090:9090 --name oracle-12cR1-ee --privileged absolutapps/oracle-12c-ee



6608e0a73fbf1a28428f27733f61e0c36d1be34bd7779655bc97f405e0659a73

(base) xxzdeMacBook-Pro:~ xxz$ docker logs -f oracle-12cR1-ee

ls: cannot access /u01/app/oracle/oradata/orcl: No such file or directory

No databases found in /u01/app/oracle/oradata/orcl. About to create a new database instance

Starting database listener


LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 01-JUN-2019 04:50:55


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


Starting /u01/app/oracle/product/12.1.0.2/dbhome_1/bin/tnslsnr: please wait...


TNSLSNR for Linux: Version 12.1.0.2.0 - Production

System parameter file is /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/diag/tnslsnr/6608e0a73fbf/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=6608e0a73fbf)(PORT=1521)))


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=6608e0a73fbf)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production

Start Date                01-JUN-2019 04:50:55

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/6608e0a73fbf/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=6608e0a73fbf)(PORT=1521)))

The listener supports no services

The command completed successfully

Copying database files

1% complete

3% complete

11% complete

18% complete

26% complete

37% complete

Creating and starting Oracle instance

40% complete

45% complete

50% complete

55% complete

56% complete

60% complete

62% complete

Completing Database Creation

66% complete

70% complete

73% complete

85% complete

96% complete

100% complete

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.


LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 01-JUN-2019 04:57:20


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=6608e0a73fbf)(PORT=1521)))

The command completed successfully

Database has been created in /u01/app/oracle/oradata/orcl

SYS and SYSTEM passwords are set to [oracle]

Setting HTTP port to 8080


PL/SQL procedure successfully completed.


Please login to http://<ip_address>:8080/em to use enterprise manager

User: sys; Password oracle; Sysdba: true

Fixing permissions...

Running init scripts...

Init scripts in /oracle.init.d/: Ignoring /oracle.init.d/*


Done with scripts we are ready to go





2.运行


(base) xxzdeMacBook-Pro:/ xxz$ docker start oracle-12cR1-ee

oracle-12cR1-ee

(base) xxzdeMacBook-Pro:/ xxz$ docker exec -it oracle-12cR1-ee /bin/bash

[root@6608e0a73fbf /]#  echo $ORACLE_SID

orcl

[root@6608e0a73fbf /]# sqlplus system/oracle@//localhost:1521/orcl


SQL*Plus: Release 12.1.0.2.0 Production on Sat Jun 1 05:07:38 2019


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



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


SQL>  desc v$instance

 Name   Null?    Type

 ----------------------------------------- -------- ----------------------------

 INSTANCE_NUMBER     NUMBER

 INSTANCE_NAME     VARCHAR2(16)

 HOST_NAME     VARCHAR2(64)

 VERSION     VARCHAR2(17)

 STARTUP_TIME     DATE

 STATUS     VARCHAR2(12)

 PARALLEL     VARCHAR2(3)

 THREAD#     NUMBER

 ARCHIVER     VARCHAR2(7)

 LOG_SWITCH_WAIT     VARCHAR2(15)

 LOGINS     VARCHAR2(10)

 SHUTDOWN_PENDING     VARCHAR2(3)

 DATABASE_STATUS     VARCHAR2(17)

 INSTANCE_ROLE     VARCHAR2(18)

 ACTIVE_STATE     VARCHAR2(9)

 BLOCKED     VARCHAR2(3)

 CON_ID     NUMBER

 INSTANCE_MODE     VARCHAR2(11)

 EDITION     VARCHAR2(7)

 FAMILY     VARCHAR2(80)


SQL> select INSTANCE_NAME,HOST_NAME from v$instance;


INSTANCE_NAME

----------------

HOST_NAME

----------------------------------------------------------------

orcl

6608e0a73fbf



SQL> select tablespace_name, file_name from dba_data_files;


TABLESPACE_NAME

------------------------------

FILE_NAME

--------------------------------------------------------------------------------

USERS

/u01/app/oracle/oradata/orcl/users01.dbf


UNDOTBS1

/u01/app/oracle/oradata/orcl/undotbs01.dbf


SYSTEM

/u01/app/oracle/oradata/orcl/system01.dbf



TABLESPACE_NAME

------------------------------

FILE_NAME

--------------------------------------------------------------------------------

SYSAUX

/u01/app/oracle/oradata/orcl/sysaux01.dbf



SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

[root@6608e0a73fbf /]# exit

exit

(base) xxzdeMacBook-Pro:/ xxz$ docker container ls

CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS              PORTS                          NAMES

6608e0a73fbf        absolutapps/oracle-12c-ee   "/entrypoint.sh"    19 minutes ago      Up 19 minutes       1521/tcp, 5500/tcp, 8080/tcp   oracle-12cR1-ee

(base) xxzdeMacBook-Pro:/ xxz$ docker stop oracle-12cR1-ee

oracle-12cR1-ee

(base) xxzdeMacBook-Pro:/ xxz$ docker container ls

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

(base) xxzdeMacBook-Pro:/ xxz$ docker image ls

REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE

oraclelinux                 latest              200d4182a980        7 weeks ago         235MB

absolutapps/oracle-12c-ee   latest              ad9bdfc002e7        3 years ago         6.12GB

(base) xxzdeMacBook-Pro:/ xxz$ docker image rm oraclelinux

Untagged: oraclelinux:latest

Untagged: oraclelinux@sha256:15626e4e41d02c514b03740a35c09f68e3f55e9d44fbbbbebe4431bc0c017d48

Deleted: sha256:200d4182a980204b33368b16d7c011e1d11a4ef462d000b40249536f8ef32b93

Deleted: sha256:24acd7ddc1860721e4391900d80b2277ba3ff34bc1403aa909a4d7e34acf00fc

(base) xxzdeMacBook-Pro:/ xxz$ docker image ls

REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE

absolutapps/oracle-12c-ee   latest              ad9bdfc002e7        3 years ago         6.12GB

(base) xxzdeMacBook-Pro:/ xxz$  docker ps

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

(base) xxzdeMacBook-Pro:/ xxz$ docker start oracle-12cR1-ee

oracle-12cR1-ee

(base) xxzdeMacBook-Pro:/ xxz$  docker ps

CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS              PORTS                          NAMES

6608e0a73fbf        absolutapps/oracle-12c-ee   "/entrypoint.sh"    20 minutes ago      Up 8 seconds        1521/tcp, 5500/tcp, 8080/tcp   oracle-12cR1-ee

(base) xxzdeMacBook-Pro:/ xxz$ 

60D6C547-E437-414A-BB61-2AD532138754.png


094BE060-1AAE-463A-9853-861857060564.png




版权声明:若无特殊注明,本文皆为《 zuoer 》原创,转载请保留文章出处。
本文链接:docker orcale 安装过程 https://www.zuoer.xin/?post=47
正文到此结束

热门推荐

管理员已关闭本篇文章评论!