最近工作上面遇到一个性能相关的问题,大体描述一下: 批量任务执行的过程中导致数据库sql执行时间过长,查看之后是由于批量任务占满数据库连接池导致的,至于为什么批量任务会不受系统控制导致连接池占满就不说了,感觉是公司内部机密。为了能够在自己的博客里面记录这个过程,博主想在自己的ubuntu上安装一个oracle,但是下载下来之后发现ubuntu安装oracle会出现各种问题,而且网上解决方案比较少,所以打算使用docker安装,顺便复习一下自己docker的操作。

  首先系统中应该存在docker这个运用程序,安装可以使用命令:sudo apt-get install docker.

  安装完成之后最好是将docker的源修改一下,修改为阿里大佬的源,讲道理比docker官方的源强100倍。详情请参考http://blog.csdn.net/bwlab/article/details/50542261

  搜索oracle相关的docker源:

work@work:~$ sudo docker search oracle
[sudo] work 的密码:
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
oraclelinux Oracle Linux is an open-source operating s... 402 [OK]
frolvlad/alpine-oraclejdk8 The smallest Docker image with OracleJDK 8... 269 [OK]
alexeiled/docker-oracle-xe-11g This is a working (hopefully) Oracle XE 11... 222 [OK]
sath89/oracle-12c Oracle Standard Edition 12c Release 1 with... 221 [OK]
sath89/oracle-xe-11g Oracle xe 11g with database files mount su... 135 [OK]
isuper/java-oracle This repository contains all java releases... 55 [OK]
jaspeen/oracle-11g Docker image for Oracle 11g database 55 [OK]
oracle/glassfish GlassFish Java EE Application Server on Or... 30 [OK]
oracle/openjdk Docker images containing OpenJDK Oracle Linux 26 [OK]
airdock/oracle-jdk Docker Image for Oracle Java SDK (8 and 7)... 23 [OK]
ingensi/oracle-jdk Official Oracle JDK installed on centos. 21 [OK]
wnameless/oracle-xe-11g Dockerfile of Oracle Database Express Edit... 20 [OK]
cogniteev/oracle-java Oracle JDK 6, 7, 8, and 9 based on Ubuntu ... 20 [OK]
n3ziniuka5/ubuntu-oracle-jdk Ubuntu with Oracle JDK. Check tags for ver... 14 [OK]
oracle/nosql Oracle NoSQL on a Docker Image with Oracle... 13 [OK]
collinestes/docker-node-oracle A container with Node.js/Oracle instant cl... 9 [OK]
openweb/oracle-tomcat A fork off of Official tomcat image with O... 7 [OK]
sgrio/java-oracle Docker images of Java 7/8 provided by Orac... 7 [OK]
andreptb/oracle-java Debian Jessie based image with Oracle JDK ... 7 [OK]
flurdy/oracle-java7 Base image containing Oracle's Java 7 JDK 5 [OK]
davidcaste/debian-oracle-java Oracle Java 8 (and 7) over Debian Jessie 3 [OK]
teradatalabs/centos6-java8-oracle Docker image of CentOS 6 with Oracle JDK 8... 3
publicisworldwide/oracle-core This is the core image based on Oracle Lin... 1 [OK]
spansari/nodejs-oracledb nodejs with oracledb installed globally on... 1
sigma/nimbus-lock-oracle 0 [OK]

  在这里我们选sath89/oracle-12c    sudo docker pull sath89/oracle-12c. 替换阿里源之后速度还是挺快的,差不多10分钟就能下载完成。查看下载的源,一共5.7G

work@work:~$ sudo docker images;
REPOSITORY TAG IMAGE ID CREATED SIZE
sath89/oracle-12c latest 17cd1ab9d9a7 days ago 5.703 GB
kalilinux/kali-linux-docker latest 8ececeaf404d months ago 1.558 GB

  创建docker oracle容器

work@work:~/app$ sudo docker run -it sath89/oracle-12c
Database not initialized. Initializing database.
Starting tnslsnr
Copying database files
% complete
% complete
% complete
% complete
% complete
% complete
Creating and starting Oracle instance
% complete
% complete
% complete
% complete
% complete
% complete
% complete
Completing Database Creation
% complete
% complete
% complete
% complete
% complete
% 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! ;)

  容器启动完成,注意使用此镜像创建的oracle用户名和密码为: system/oracle,然后我们使用本地的sql工具连接虚拟机的oracle。

   至此,使用docker安装oracle完成,安装过程简单,非生产环境可以考虑使用。下一节详细说明以下遇到的性能问题及相关的分析思路。

docker安装oracle的更多相关文章

  1. mac系统用docker安装oracle数据库

    oracle没有mac可用的版本,最好的办法是通过docker安装 一.下载docker 1.通过brew下载 brew cask install docker 2.手动下载(需要vpn) https ...

  2. docker 安装 oracle

    docker 安装 oracle 部署链接:https://www.linuxidc.com/Linux/2017-03/141760.htm 本次使用docker安装oracle 1.搜索可使用的镜 ...

  3. Docker | Mac 通过 Docker 安装 Oracle

    Docker | Mac 通过 Docker 安装 Oracle 前言: Oracle 10g 以后就不支持 Mac 版本,因此 Mac 用户需要安装的话可以通过虚拟机或者 Docker 1.在 do ...

  4. 使用Docker安装Oracle数据库

    在很多时候,我们需要在本地安装Oracle数据库,但是整个安装的过程时间非常长而且安装文件大,那么有不有更好的办法来安装Oracle数据库既能减少安装的时间而且还能够快速进行部署呢?答案就是使用Doc ...

  5. Docker 安装Oracle

    1.使用docker 命令搜索oracle 镜像,前提是已安装了Docker docker  search oracle 2.下载相应版本的oracle 镜像 docker pull sath89/o ...

  6. ubuntu docker 安装 oracle

    1.ubuntu 安装docker sudo apt-get update sudo apt-get docker.io 2.docker下载oracle镜像 sudo docker pull wna ...

  7. Win10系统使用Docker安装oracle并通过Navicat for oracle进行登录

    一.安装Docker Linux系统可以直接采用命令进行Docker安装: Win7系统安装Dokcer实际通过Boot2Docker在Windows下安装一个VirtualBox来实现: Boot2 ...

  8. docker安装Oracle 12c

    1.安装阿里的docker源: cat /etc/docker/daemon.json { "registry-mirrors": ["https://pee6w651. ...

  9. Docker 安装 oracle 并使用 navicat 实现外部连接

    1,拉取 docker 镜像:docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g 1.1 , 该镜像由阿里云提供,比较大, ...

随机推荐

  1. bzoj 3028 食物——生成函数

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3028 把式子写出来,化一化,变成 x / ((1-x)^4) ,变成几个 sigma 相乘的 ...

  2. bzoj 2744 [HEOI2012]朋友圈——补图!+匈牙利算法

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2744 求最大的团<==>补图(有边的变成没边.没边的变成有边)的最大独立集! A ...

  3. LeetCode第二题:Add Two Numbers

    You are given two non-empty linked lists representing two non-negative integers. The digits are stor ...

  4. GPIO编程2:使用GPIO监听中断完整程序

    一个完整的使用GPIO捕捉中断的程序: #include<stdlib.h> #include<stdio.h> #include<string.h> #inclu ...

  5. POJ2230(打印欧拉回路)

    Watchcow Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 7473   Accepted: 3270   Specia ...

  6. PostgreSQL 9.5 客户端认证

    PostgreSQL 9.5 客户端认证 当一个客户端应用连接一个数据库服务器时,它将指定以哪个PostgreSQL 数据库用户名连接,就像我们以一个特定用户登录一台 Unix 计算机一样.在 SQL ...

  7. maven中maven dependencies中依赖出现了项目

    maven 中maven dependencies中依赖出现了项目,把依赖的项目关掉,项目消失,但是还是无法打包 ,出现的错误如图.说明:依赖的项目为project-dao  打包的项目为projec ...

  8. mybatis---demo1--(单表增删改查)----bai

    实体类: package com.etc.entity; public class News { private int id; private String title; private Strin ...

  9. 2015.1.10 解决DataGridView SelectionChanged事件自动触发问题

    DataGridView SelectionChanged事件总是在数据源更改时自动触发,这点很讨厌. 可用CellClick和KeyUp事件和一个函数替代SelectionChanged事件 pri ...

  10. 第十五章 深入分析iBatis框架之系统架构与映射原理(待续)

    iBatis框架主要的类层次结构 iBatis框架的设计策略 iBatis框架的运行原理 iBatis框架对SQL语句的解析 数据库字段映射到Java对象 示例运行的结果 设计模式解析之简单工厂模式 ...