栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

docker安装oracle12c

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

docker安装oracle12c

1.下载oracle
[root@docker ~]# docker pull fluigfws/oracle12c
Using default tag: latest
latest: Pulling from fluigfws/oracle12c
a6f900024487: Pull complete 
c5f5961beb4a: Pull complete 
ee0746f2ca62: Pull complete 
4f4fb700ef54: Pull complete 
c4b3634beec2: Pull complete 
e945079f04b2: Pull complete 
00773a7db96f: Pull complete 
b0a29dc9d107: Pull complete 
c8f49a0fe3b2: Pull complete 
c158aded225e: Pull complete 
d62333448be3: Pull complete 
Digest: sha256:81aa6fb1f1983499dcfd8c373bac457a53843a4fc3fde1501895f80729d4433f
Status: Downloaded newer image for fluigfws/oracle12c:latest
docker.io/fluigfws/oracle12c:latest
2.进入docker容器设置oracle
[root@docker ~]# docker run -d --name oracle12c  -p 11521:1521 --shm-size=1g fluigfws/oracle12c 
#11521端口是宿主机,1521 是容器内的端口
5544fe45dd707920be53d80b862a17d66b80147ccbf8ff1428ce88f6612684eb
[root@docker ~]# docker ps -aq
CONTAINER ID   IMAGE                COMMAND             CREATED          STATUS         PORTS                                                   NAMES
5544fe45dd70   
[root@docker ~]# docker exec -it 5544fe45dd70 /bin/bash

root@5544fe45dd70:/u01/app/oracle/product/12.1.0/xe# pwd
/u01/app/oracle/product/12.1.0/xe #这个xe就是SID

sqlplus 
Enter user-name: sys/oracle as sysdba
create user libo identified by m123;#m123是密码
grant connect to libo;
grant resource to libo;

验证:
disconn
conn libo/m123


关机以后第二次进入
[root@centos7shell ~]# docker start $(docker ps -aq)
b94c98f184cf
3.使用Navicat连接oracle


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/868306.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号