继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

Docker快速搭建Oracle12c

Moonrise_Miazzy
关注TA
已关注
手记 26
粉丝 8
获赞 58



转载来源:https://hub.docker.com/r/sath89/oracle-12c/

 

Docker快速搭建Oracle12c

 

https://img1.mukewang.com/5c1c47750001065428501686.jpg

使用Docker命令拉取oracle-12c镜像

docker pull sath89/oracle-12c

启动并暴露8080&1521端口,8080可以登录网页端管理,1521是数据连接端口:

docker run -d -p 8080:8080 -p 1521:1521 sath89/oracle-12c

启动并暴露8080&1521端口,并且挂载宿主机目录 /my/oracle/data 到oracle服务器/u01/app/oracle目录,这样database数据就保存在本地宿主机上:

docker run -d -p 8080:8080 -p 1521:1521 -v /my/oracle/data:/u01/app/oracle sath89/oracle-12c

 启动并定制化DBCA总内存大小,DBCA_TOTAL_MEMORY (in Mb):

docker run -d -p 8080:8080 -p 1521:1521 -v /my/oracle/data:/u01/app/oracle -e DBCA_TOTAL_MEMORY=1024 sath89/oracle-12c

 Orale服务器连接参数:

hostname: localhostport: 1521sid: xeservice name: xeusername: systempassword: oracle

使用如下命令连接sqlplus:

 sqlplus system/oracle@//localhost:1521/xe

Password for SYS & SYSTEM:

oracle

 Oracle Web管理端连接参数:

http://localhost:8080/apexworkspace: INTERNALuser: ADMINpassword: 0Racle$

Apex upgrade up to v 5. (配置Apex   Oracle Application Express)*

docker run -it --rm --volumes-from ${DB_CONTAINER_NAME} --link ${DB_CONTAINER_NAME}:oracle-database -e PASS=YourSYSPASS sath89/apex install

Details could be found here: https://github.com/MaksymBilenko/docker-oracle-apex

Oracle Enterprise Management console (Oracle企业管理控制台):

http://localhost:8080/emuser: syspassword: oracleconnect as sysdba: true

 配置环境变量参数,关闭Web CONSOLE:

docker run -d -e WEB_CONSOLE=false -p 1521:1521 -v /my/oracle/data:/u01/app/oracle sath89/oracle-12c#You can Enable/Disable it on any time

启动Oracle,并加载初始化脚本:

docker run -d -p 1521:1521 -v /my/oracle/data:/u01/app/oracle -v /my/oracle/init/SCRIPTSorSQL:/docker-entrypoint-initdb.d sath89/oracle-12c

By default Import from docker-entrypoint-initdb.d is enabled only if you are initializing database (1st run).

To customize dump import use IMPDP_OPTIONS env variable like -e IMPDP_OPTIONS="REMAP_TABLESPACE=FOO:BAR" To run import at any case add -e IMPORT_FROM_VOLUME=true

In case of using DMP imports dump file should be named like ${IMPORT_SCHEME_NAME}.dmp

User credentials for imports are ${IMPORT_SCHEME_NAME}/${IMPORT_SCHEME_NAME}

If you have an issue with database init like DBCA operation failed, please reffer to this issue

TODO LIST

  • Web management console HTTPS port

  • Add functionality to run custom scripts on startup, for example User creation

  • Add Parameter that would setup processes amount for database (Currently by default processes=300)

  • Spike with clustering support

  • Spike with DB migration from 11g

In case of any issues please post it here.


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP