Winodws Docker安装Oracle 11g
2022/3/1 2:22:45
本文主要是介绍Winodws Docker安装Oracle 11g,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
这里写自定义目录标题
- 获取镜像
- 启动镜像
- 处理Exited 139问题
- 配置ORACLE
- 测试数据库连接
获取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
启动镜像
docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
处理Exited 139问题
1.要在%userprofile%文件夹下创建一个.wslconfig文件
2.在运行中打开%userprofile%
3.文件内容
[wsl2] kernelCommandLine = vsyscall=emulate
4.在cmd中执行wsl --shutdown
5.重启docker desktop,oracle的容器就能启动
配置ORACLE
1.切换到root用户
su - root password:helowin
2.编辑/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
3.使环境变量生效
source /etc/profile
4.创建软链接
ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
5.切换oracle用户登录sqlplus
su - oracle sqlplus /nolog conn as/ sysdba
6.更改用户密码
alter user system identified by system; alter user sys identified by sys;
7.设置密码永不过期
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
8.scott用户的开启
alter user scott account unlock; alter user scott identified by abc--密码; commit;
测试数据库连接
参考:
[1]: https://baijiahao.baidu.com/s?id=1711481608528112705&wfr=spider&for=pc
这篇关于Winodws Docker安装Oracle 11g的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-09-29100 个常见的 Docker 错误及解决方案
- 2024-09-26制作 llama3 RAG 系统的 Docker 容器
- 2024-09-25Podman — 一个简单、轻量的 Docker 替代品
- 2024-09-25Docker 快速参考指南(初学者版) ??
- 2024-09-25使用 Docker 在单个 VPS 上部署多个应用
- 2024-09-21Docker环境部署资料:新手入门指南
- 2024-09-20Docker环境部署项目实战:新手入门全攻略
- 2024-09-20Docker环境部署:新手入门教程
- 2024-09-20Docker环境部署学习:从入门到实践
- 2024-09-20Docker环境部署入门:新手必读指南