docker 安装oracle数据库产生的问题
今天,我利用我们实验室安装了oracle的数据库,我们要用这个数据库,但是在安装的过程中出现了很多的问题,那么,下面,我们一起来看看都出现了什么样的问题吧。【哭哭哭】
根据以前的文章,【https://blog.breakpoint.vip/topicinner2?topicId=1128927847839305728】
我是在我的本地【也就是mac os系统上】安装的docker 之后,安装的oracle的数据库,安装的过程中没有任何的问题,但是在Ubuntu的系统上,产生了很多很多的问题:
1.启动容器报错,一直安装不上
2.怀疑过是docker的问题,但是,最后发现,不是docker的问题
接下来,我们一起来看一下,我这一下午的操作结果【哭哭哭】
首先,我们根据以前的文章,安装了quay.io/maksymbilenko/oracle-12
但是,我们启动的时候,就会出现了很多的错误,如下图
这样的结果,一直在安装,但是,始终没有解决,所以猜测是Ubuntu的系统问题,和这个oracle版本不符合的问题。之后就选择安装了oracle11g。
下面是安装的过程:
zhaoligang@dell-PowerEdge-T640:~$ sudo docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
Using default tag: latest
latest: Pulling from helowin/oracle_11g
ed5542b8e0e1: Pull complete
a3ed95caeb02: Pull complete
1e8f80d0799e: Pull complete
Digest: sha256:4c12b98372dfcbaafcd9564a37c8d91456090a5c6fb07a4ec18270c9d9ef9726
Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g:latest
registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g:latest
复制
下载完成后,我们查看一下我们的images
haoligang@dell-PowerEdge-T640:~$ sudo docker images
[sudo] zhaoligang 的密码:
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/maksymbilenko/oracle-12c latest bdc272e2d9c9 2 months ago 8GB
ubuntu 16.04 13c9f1285025 3 months ago 119MB
hello-world latest fce289e99eb9 9 months ago 1.84kB
quay.io/openai/universe.flashgames 0.20.28 e55f692f7c56 2 years ago 1.75GB
quay.io/openai/universe.gym-core 0.20.6 6c0b090e3165 2 years ago 1.75GB
registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g latest 3fa112fd3642 3 years ago 6.85GB
jaspeen/oracle-11g latest 0c8711fe4f0f 4 years ago 281MB
复制
之后,我们进行启动
sudo docker run -d --name oracle_11g -p 1521:1521 -v /app/:/app/ registry.aliyuncs.com/helowin/oracle_11g
复制
查看操作日志
sudo docker logs -f a76919e7a33e255f5afabeafe44c7ea7a32c3992a638d89a6f2ac31c12354051
复制
切换到oracle用户:
sudo docker exec -it 014d82aaffbf /bin/bash
复制
登陆数据库,修改相对应的用户和密码:
sqlplus / as sysdba
之后,我们就可以在本地进行登陆了
复制
看一看我们的结果:
至此,完成了我们的数据库的操作,接下来,我们要完成其他的工作。