Docker如何拉取oracle11g镜像呢?
下文笔者讲述使用Docker命令拉取oracle11g的镜像的方法分享,如下所示
实现思路: 拉取镜像 docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g 查看镜像 docker images 启动容器 docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g 进入镜像配置 docker exec -it oracle bash
进行软连接
sqlplus /nolog
切换到root用户下:
su root
输入密码:pwd
编辑profile文件配置ORACLE环境变量
vi /etc/profile
追加配置
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=testoracle
export PATH=$ORACLE_HOME/bin:$PATH
刷新profile
source profile
切换到oracle用户
su - oracle
登录sqlplus并修改sys、system用户密码:
sqlplus /nolog
conn /as sysdba
修改密码:
alter user system identified by system;
alter user sys identified by sys;
注意:如果修改密码时提示数据库没有打开:(database not open)
输入
alter database open;
如果提示(database not mounted)
输入
alter database mount;
最后刷新表
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
使用Navicat连接
首先查看oracle 的 lsnrctl 服务
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。


