首页 > 数据库技术 > 详细

windows上使用docker安装oracle11g

时间:2020-05-02 22:33:18      阅读:616      评论:0      收藏:0      [点我收藏+]
拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g

启动oracle镜像作为容器
    docker run --restart=always  -d   -p 1521:1521 --name oracle11g  registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
 
进入容器
    docker exec -it oracle11g  /bin/bash
进入容器之后进行下列操作

修改环境变量
su root
#密码 helowin

vi /etc/profile

#行末 unset -f pathmunge 下一行 按i 粘贴如下环境变量

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

#按esc 输入 :wq! 按enter

最后输入下列代码,退出
source /etc/profile


 

 

 

技术分享图片

 

 

依次输入以下命令
sqlplus /nolog
conn /as sysdba;
alter user system identified by oracle;   //这里是把system用户密码设为oracle
conn system/oracle;
create user account identified by password;  //注意这里user后面是你设置的用户名,by后面是你设置的密码

grant create session to  用户名;   //给用户授权之后才能登陆

 

 

 

 

技术分享图片

 

grant create session to  用户名;   //给用户授权之后才能登陆

 

 

技术分享图片

 

windows上使用docker安装oracle11g

原文:https://www.cnblogs.com/1439107348s/p/12819382.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!