Docker安装Oracle(以Oracle_11g为例)
拉取oracle_11g镜像: 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 -v /home/oracle/app/oracle/product/11.2.0/dbhome_2:/home/oracle/app/oracle/product/11.2.0/dbhome_2
查看容器启动状态: docker ps | grep oracle11g
进入oracle11g容器进行配置: docker exec -it oracle11g bash
切换到root用户下进行配置: su root 输入密码: helowin
编辑profile文件配置ORACLE环境变量: vi /etc/profile ,并添加如下内容, 保存退出后使配置生效 source /etc/profile
1 export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2 2 export ORACLE_SID=helowin 3 export PATH=$ORACLE_HOME/bin:$PATH
创建软连接: ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
切换到oracle 用户: su - oracle
登录sqlplus并修改sys、system用户密码:
1 sqlplus /nolog # 登录 2 conn /as sysdba # 连接 3 alter user system identified by system; # 修改密码 4 alter user sys identified by sys; # 修改密码 5 ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; 6 exit;
查看一下oracle实例状态: lsnrctl status
navicate连接
————————————————
原文链接:https://blog.csdn.net/zwq56693/article/details/123903308
标签:11g,helowin,oracle,ORACLE,Oracle,Docker,好用,oracle11g From: https://www.cnblogs.com/x666-6/p/16853296.html