docker安装oracle

原创
2021/05/15 15:26
阅读数 34
  1. 拉取镜像:
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
  1. 创建容器
docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
  1. 进入镜像配置
docker exec -it oracle11g bash
su root;
密码:helowin

编辑环境变量:

vi /etc/profile

export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=helowin
export PATH=$ORACLE_HOME/bin:$PATH

创建软连接

ln -s $ORACLE_HOME/bin/sqlplus /usr/bin

source /etc/profile

切换到oracle 用户: sudo - oracle

sqlplus /nolog

conn /as sysdba

接着执行下面命令

alter user system identified by system;
alter user sys identified by sys;
  1. docker restart oracle11g 最后使用navicat连接

整理于网络: https://www.cnblogs.com/xiaoyuxixi/p/13739596.html

展开阅读全文
加载中

作者的其它热门文章

打赏
0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部