docker 安装 oracle12,使用Docker安装Oracle 12c
使用Docker安装Oracle 12c
假设你的服务器已成功安装Docker,继续进行以下操作:
1. 启动Docker
[root@node01 ~]# service docker start
2. 从远程仓库搜索oracle image
[root@node01 ~]# docker search oracle
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/wnameless/oracle-xe-11g Oracle Express 11g R2 on Ubuntu 16.04 LTS 457 [OK]
docker.io docker.io/oraclelinux Oracle Linux is an open-source operating s... 347 [OK]
docker.io docker.io/alexeiled/docker-oracle-xe-11g This is a working (hopefully) Oracle XE 11... 208 [OK]
docker.io docker.io/sath89/oracle-12c Oracle Standard Edition 12c Release 1 with... 141 [OK]
docker.io docker.io/sath89/oracle-xe-11g Oracle xe 11g with database files mount su... 99 [OK]
docker.io docker.io/isuper/java-oracle This repository contains all java releases... 56 [OK]
docker.io docker.io/jaspeen/oracle-11g Docker image for Oracle 11g database 39 [OK]
docker.io docker.io/oracle/oraclelinux Oracle Linux is an open-source operating s... 37 [OK]
docker.io docker.io/ingensi/oracle-jdk Official Oracle JDK installed on centos. 20 [OK]
docker.io docker.io/oracle/openjdk Docker images containing OpenJDK Oracle Linux 20 [OK]
docker.io docker.io/cogniteev/oracle-java Oracle JDK 6, 7, 8, and 9 based on Ubuntu ... 19 [OK]
docker.io docker.io/airdock/oracle-jdk Docker Image for Oracle Java SDK (8 and 7)... 18 [OK]
docker.io docker.io/oracle/glassfish GlassFish Java EE Application Server on Or... 15 [OK]
docker.io docker.io/n3ziniuka5/ubuntu-oracle-jdk Ubuntu with Oracle JDK. Check tags for ver... 13 [OK]
docker.io docker.io/oracle/nosql Oracle NoSQL on a Docker Image with Oracle... 10 [OK]
docker.io docker.io/andreptb/oracle-java Debian Jessie based image with Oracle JDK ... 8 [OK]
docker.io docker.io/infogene/oracle Image for running Oracle Database 11g Stan... 6 [OK]
docker.io docker.io/openweb/oracle-tomcat A fork off of Official tomcat image with O... 5 [OK]
docker.io docker.io/flurdy/oracle-java7 Base image containing Oracle's Java 7 JDK 4 [OK]
docker.io docker.io/davidcaste/debian-oracle-java Oracle Java 8 (and 7) over Debian Jessie 3 [OK]
docker.io docker.io/jtech/oracle-jdk A Docker image based on the smallest Linux... 3 [OK]
docker.io docker.io/sgrio/java-oracle Docker images of Java 7/8 provided by Orac... 3 [OK]
docker.io docker.io/clincase/oracle clincase oracle db server image 1 [OK]
docker.io docker.io/publicisworldwide/oracle-core This is the core image based on Oracle Lin... 1 [OK]
docker.io docker.io/expertsystems/oracle-jdk8 CentOS based base image with Oracle JDK 8 0 [OK]
远程仓库中有很多oracle image,本次我们选择Oracle-12c
3. 从远程仓库获取oracle-12c image
[root@node01 ~]# docker pull sath89/oracle-12c
Using default tag: latest
Trying to pull repository docker.io/sath89/oracle-12c ...
latest: Pulling from docker.io/sath89/oracle-12c
863735b9fd15: Pull complete
4fbaa2f403df: Pull complete
44be94a95984: Pull complete
a3ed95caeb02: Pull complete
b8bc6e8767ee: Pull complete
c918da326197: Pull complete
448e1619a038: Pull complete
faadd00cf98e: Pull complete
48a252b66251: Pull complete
0be1ba285f23: Pull complete
Digest: sha256:0d075905ca2243f0c60397e49eaae6edd62afcce43528df77768f346ece7c49b
4. 查看下载好的image
[root@node01 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/sath89/oracle-12c latest 7508a4d8d54f 13 days ago 5.703 GB
docker images : 列出本地镜像。
5. 使用刚刚下载下来的oracle 12c image创建一个container,并运行其中的oracle数据库。命令执行成功会返回一个container id
[root@node01 ~]# docker run -d -p 9090:8080 -p 1521:1521 -v /mnt/bd/data/oracle:/u01/app/oracle sath89/oracle-12c
c5a4400ae7d2586c3bec039685e1a8046c998cb2223bef7b3c71b01f2fa1204e
docker run :创建一个新的容器并运行一个命令。-d: 后台运行容器,并返回容器ID;-p:主机与容器的端口映射(主机ip:容器ip);-v:主机与容器的目录映射。
6. 查看container日志
[root@node01 ~]# docker logs -f c5a4400ae7d2586c3bec039685e1a8046c998cb2223bef7b3c71b01f2fa1204e
Database not initialized. Initializing database.
Starting tnslsnr
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/xe/xe.log" for further details.
Configuring Apex console
Database initialized. Please visit http://#containeer:8080/em http://#containeer:8080/apex for extra configuration if needed
Starting web management console
PL/SQL procedure successfully completed.
Starting import from '/docker-entrypoint-initdb.d':
found file /docker-entrypoint-initdb.d//docker-entrypoint-initdb.d/*
[IMPORT] /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
Import finished
Database ready to use. Enjoy! ;)
7. 查看container状态
[root@node01 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c5a4400ae7d2 sath89/oracle-12c "/entrypoint.sh " 9 minutes ago Up 9 minutes 0.0.0.0:1521->1521/tcp, 0.0.0.0:9090->8080/tcp silly_thompson
8.进入刚刚创建的container中
[root@node01 ~]# docker exec -it c5a4400ae7d2 /bin/bash
root@c5a4400ae7d2:/# su oracle
oracle@c5a4400ae7d2:/$ $ORACLE_HOME/bin/sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Jun 19 10:26:59 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL> conn system/oracle as sysdba;
Connected.
docker exec :在运行的容器中执行命令。-i :即使没有附加也保持STDIN 打开;-t :分配一个伪终端。
9.Connect database with following setting:
hostname: localhost
port: 1521
sid: xe
service name: xe.oracle.docker
username: system
password: oracle
相关文章:

python3 面向对象(一)
以Student类为例,定义类通过 class 关键字 class Student(object):pass class 后面紧接着是类名,即 Student,类名通常是大写开头的单词,紧接着是 (object),表示该类是从哪个类继承下来的 >>> stu Student() …

shell监控java接口服务_Linux系统下Java通过shell脚本监控重启服务
简介最近运维人员提出需求,增加一个运维页面, 查询当前的业务进程信息包括:进程名称、启动命令、启动时间、运行时间等,可以通过页面点击重启按钮,可以重启后端的一系列系统进程。思路java程序获取linux进程信息可以通…

signature=680da11b802226668317d65ae7c38eb7,encryption with designated verifiers
摘要:The offline keyword guessing attack (KG attack) is a new security threat to the searchable public key encryption with designated verifier. Many techniques have been proposed to resist such an attack. However, all these techniques are only s…

PHPMailer类 发送邮件
/*** [sendMail 邮件发送类]* param [string] $address [收件人的邮件地址]* param [string] $nickname [收件人的昵称]* param [string] $subject [邮件的标题]* param [string] $content [邮件的内容]* param [string] $attachment [邮件的附件]* return …

oracle两张表 比较好,比较Oracle两张表的数据是否一样
比较Oracle两张表的数据是否一样爱搞机 2008-10-21 11:00在某些情况下,我们会需要比较两张表的数据是否一样。假设有两张表A与表B他的字段相同,但是当中的数据可能不同,而且有些字段的数据还有可能为空方法一(手动):把需要比较的两…

java applet 缺陷_Java Applet在最新JRE上的奇怪性能行为(7.55)
我们使用来自签名提供商的一些专有小程序来签署一些XML.当我们使用JRE 6u37 applet运行没有问题 – 运行速度非常快,从不冻结.但是当我们将JRE更新为7u55或更新时,它经常开始挂起.只有浏览器重启帮助.有没有办法解决这个问题可能是由一些参数或其他东西?这是运行代码…

在线考试系统html模板,请问谁有在线考试系统的网页模板?
请问谁有在线考试系统的网页模板?(2017-03-22 22:58:03)标签:杂谈《帝国网站管理系统》英文译为"EmpireCMS",简称"Ecms",它是基于B/S结构,且功能强大而帝国CMS-logo易用的网站管理系统。本系统由帝…

三角形(css3)
1 .userCard .sanjiao {//三角形的制作;2 width: 0;3 height: 0;4 border-left: 10px solid transparent;5 border-right: 10px solid transparent;6 border-bottom: 10px solid rgba(0, 0, 0, .9);7 margin: -23px 0 0 -10px;8 left: …

MySQL数据copy
摘自http://database.51cto.com/art/201011/234776.htm 1. 下面这个语句会拷贝表结构到新表newadmin中。 (不会拷贝表中的数据) CREATE TABLE newadmin LIKE admin 2. 下面这个语句会拷贝数据到新表中。 注意:这个语句其实只是把select语句…

oracle数据库有哪些文件构成,Oracle数据库架构中包括几层?每层都有什么元素?...
Oracle数据库架构中包括几层?每层都有什么元素?1 PL/SQL代表 A PROCEDURAL LANGUAGE/SQL B PROGRAM LANGUAGE SQL C POWER LANGUAGE SQL D 都不对2 _____引擎执行PL/SQL块A SQL B PL/SQL C ORACLE D 都不对3 一个对象可以呈现多种形式的能力称为A 多态B …

用html怎么 显示直线,html怎么用鼠标画出一条直线,鼠标移动时候要能看到线条...
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼window.onload function(){var oC document.getElementById(c1);var oGC oC.getContext(2d);oC.onmousedown function(ev){var ev ev || window.event;oGC.beginPath();oGC.moveTo(ev.clientX-oC.offsetLeft,ev.clientY-oC.of…

bzoj 1962: 模型王子
呵呵呵呵http://wenku.baidu.com/link?urlo0CPVzuBDLJMt0_7Qph1T7TtdFOzu7O-apIpvaWbIYMz8ZWqBneGqI8LGtLdqpuK5fbQ_v-H01zHwPXDsPrioR5xjCDHjqJn_boYO87ikr_ 1 #include <bits/stdc.h>2 #define LL long long3 #define lowbit(x) x&(-x)4 #define inf 0x3f3f3f3f5 …

cygwin编译verilator_Windows 安装 verilator
windows bubun(cygwin)下载verilatortar xvzf verilator*.t*gzcd verilator*./configure报错./configure /cygdrive/e/download/verilator-4.016configuring for Verilator 4.016 2019-06-16checking whether to use hardcoded paths... yeschecking whether to show and stop …

navicat 几个 可用的东西
1.常用的 表格 一启动 就进入的某某连接某某数据库某某表 2. 结构 比对(菜单栏 “工具里面”) 3.数据对比 同上 4.保持连接 5.全局查询 在工具中查找 ------在数据库或模式中查找 转载于:https://www.cnblogs.com/hnqm/p/9534942.html

linux内核 semaphore,2.4内核里semaphore源码的一个疑问
博主你好, 请教一个问题.__down()里面有一段代码, 我觉得不那么保险.我先把__down的源码贴出来:void __down(struct semaphore * sem){struct task_struct *tsk current;DECLARE_WAITQUEUE(wait, tsk); //定义一个"队列项", 等待者是当前进…

Android UI体验之全屏沉浸式透明状态栏效果
前言: Android 4.4之后谷歌提供了沉浸式全屏体验, 在沉浸式全屏模式下, 状态栏、 虚拟按键动态隐藏, 应用可以使用完整的屏幕空间, 按照 Google 的说法, 给用户一种 身临其境 的体验。而Android 5.0之后谷歌…

html 多项选择,选项标签中的HTML多字段选择
这可以通过switch语句实现,但这不是最好的方法。我建议将以下函数作为change事件的事件处理程序。您还需要在窗口加载时运行它,以初始化它。function updateSel() {var sel document.getElementById(sel);var hidden sel.getElementsByClassName(hidde…

tp5.0 queue 队列操作
检查是否安装redis(没有请自行百度安装): phpinfo: 配置thinkphp-queue,没有请执行 composer require topthink/think-queue 加入: 创建 队列 文件: use think\Queue;class TestQueue {// 测试public function queue()…

java redis管理_优雅时间管理Java轻松做到,想学么?
原标题:优雅时间管理Java轻松做到,想学么?来源 |http://rrd.me/gCQHp前言:需求是这样的,在与第三方对接过程中,对方提供了token进行时效性验证,过一段时间token就会失效.后台有定时任务在获取&a…

jenkins运行日志时间与linux,Jenkins 用户文档(运行多个步骤)
运行多个步骤管道由多个步骤组成,允许你构建、测试和部署应用程序,Jenkins管道允许你以简单的方式组成多个步骤,可以帮助你为任何类型的自动化过程建模。将“步骤”想象成执行单个操作的单个命令,当一个步骤成功时,它将…

HPU组队赛B:问题(二进制枚举)
时间限制1 Second 内存限制 512 Mb 题目描述 你有n个问题,你已经估计了第i个问题的难度为Ci,现在你想使用这些问题去构造一个问题集。比赛的问题集必须包含至少两个问题,而且比赛的总难度必须至少为l至多为r,此外最简单的问题和最难的问题之间的差异至少…

html脱机不显示图片,Python绘图脱机图表嵌入HTML(不工作)
aPlot是绘图文件的文件名。在在您的iframe中,您将.embed?width800&height550添加到文件名中,这将导致一个不存在的文件名。在当您删除这个字符串时,即src" aPlot ",它应该可以工作。在不必嵌入整个HTML文件&…

数据库分库分表(sharding)系列
数据库分库分表(sharding)系列转载于:https://www.cnblogs.com/gotodsp/p/6517478.html

php imagecopy 用法,php使用imagecopymerge()函数创建半透明水印
使用imagecopymerge() 函数创建半透明水印,供大家参考,具体内容如下// 加载要加水印的图像$im imagecreatefromjpeg(photo.jpeg);// 首先我们从 GD 手动创建水印图像$stamp imagecreatetruecolor(100, 70);imagefilledrectangle($stamp, 0, 0, 99, 69,…
linux系统yum源,Linux开启安装EPEL YUM源
我们用yum安装软件时,经常发现我们的yum源里面没有该软件,需要自己去wget,然后configure,make,make install,太折腾了。其实,CentOS还有一个源叫做 EPEL (Extra Packages for Enterprise),里面有1万多个软件࿰…

MATLAB简易验证码识别程序介绍
本推文主要识别的验证码是这种:第一步: 二值化所谓二值化就是把不需要的信息通通去除,比如背景,干扰线,干扰像素等等,只剩下需要识别的文字,让图片变成2进制点阵。第二步: 文字分割为了能识别出字符,需要对…

mac终端命令-----常规操作
OSX 的文件系统 OSX 采用的Unix文件系统,所有文件都挂在跟目录 / 下面,所以不在要有Windows 下的盘符概念。 你在桌面上看到的硬盘都挂在 /Volumes 下。 比如接上个叫做 USBHD的移动硬盘,桌面上会显示出一个硬盘图标,它实际在哪里…

php true true true,php-为什么此评估为true
标签:php乳清这算是真的吗?$val20;//outputs that is an error123if($val2error123){echo that is an error123;}else{echo that is not an error123;}解决方法:您正在将字符串与整数进行比较.为了进行比较,首先将字符串转换为整数.当“ error123”转换为…

一个html文件放到服务器访问,访问云服务器里面的html文件
弹性云服务器 ECS弹性云服务器(Elastic Cloud Server)是一种可随时自助获取、可弹性伸缩的云服务器,帮助用户打造可靠、安全、灵活、高效的应用环境,确保服务持久稳定运行,提升运维效率三年低至5折,多种配置可选了解详情建站入门|…

limbo可以运行linux,这次真的了,安卓手机可以安装 Windows 10 了
原标题:这次真的了,安卓手机可以安装 Windows 10 了上回雷锋哥给大家分享过「安卓可以体验 "Windows 10" 了」实际上就是一个第三方安卓桌面启动器模仿 Windows 10 的主题,所以只能说是美化,并非真的运行 Windows 10 系…