网站运营
位置:首页>> 网站运营>> Docker安装Oracle_11g的方法

Docker安装Oracle_11g的方法

作者:TOP灬小朋友  发布时间:2022-01-09 13:03:34 

标签:Docker,Oracle,11g

Docker安装Oracle_11g

1.拉取oracle_11g镜像


docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g

Docker安装Oracle_11g的方法

2.创建oracle11g容器


docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g

3.查看oracle11g容器是否创建成功


docker ps -a

Docker安装Oracle_11g的方法

4.启动oracle11g容器


docker start oracle11g

Docker安装Oracle_11g的方法

5.进入oracle11g容器进行配置


docker exec -it oracle11g bash

6.切换到root用户下进行配置


su root

密码为:helowin

Docker安装Oracle_11g的方法

7、编辑profile文件配置ORACLE环境变量


vi /etc/profile

Docker安装Oracle_11g的方法

8、最后添加以下3行配置


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

Docker安装Oracle_11g的方法

保存 ::wq
让配置生效:source /etc/profile

9、创建软连接


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

10、切换到oracle 用户


su - oracle

Docker安装Oracle_11g的方法

11、登录sqlplus并修改sys、system用户密码


sqlplus /nolog

conn /as sysdba

Docker安装Oracle_11g的方法

12、修改sys、system用户密码并刷新权限


alter user system identified by oracle;
alter user sys identified by oracle;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Docker安装Oracle_11g的方法

退出:exit;
13、查看一下oracle实例状态


lsnrctl status

Docker安装Oracle_11g的方法

14、用nacivat连接oracle数据库

服务名:helowin(一定要填写helowin)
密码:oracle(第12步设置的密码)

Docker安装Oracle_11g的方法

来源:https://blog.csdn.net/qq_42021376/article/details/115444547

0
投稿

猜你喜欢

手机版 网站运营 asp之家 www.aspxhome.com