dokcer安装oracle11g

1.拉取镜像:
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
2.创建容器 
docker run -d -p 9090:8080 -p 1521:1521 --name  oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
3.进入镜像配置
	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
su - oracle
sqlplus /nolog
conn /as sysdba
接着执行下面命令
        alter user system identified by system;
4.docker restart oracle11g
现在可以用system用户连接,密码:system

在这里插入图片描述

Guess you like

Origin blog.csdn.net/chushudu/article/details/115522039