当前位置:网站首页>Docker 下 Oracle 安装与配置
Docker 下 Oracle 安装与配置
2022-07-29 21:16:00 【JAVA·D·WangJing】
一、Docker 版本
二、拉取 nacos 镜像
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
三、查看本地镜像
docker images
四、启动容器
# 默认启动容器的方式
docker run -d -it -p 1521:1521 --name oracle11g --restart=always registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
# 持久化启动的方式
docker run -d -it -p 1521:1521 --name oracle --restart=always --mount source=oracle_vol,target=/home/oracle/app/oracle/oradata registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
五、安装成功,查看容器运行状况
docker ps
六、容器内环境配置
# 进入容器
docker exec -it oracle11g bash
# 切换到 root 用户
su root
# 密码为 helowin
helowin
# docker容器配置环境变量不是在 /etc/profile 中,容器启动不会走这个文件;可以将环境变量的配置设置在 /home/oracle/.bashrc 文件下,这样可以省略掉软连接的创建 ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
# 编辑环境变量
vi /home/oracle/.bashrc
# 文件末尾添加如下命令
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=helowin
export PATH=$ORACLE_HOME/bin:$PATH
# 刷新环境变量
source /home/oracle/.bashrc
七、进入 oracle 命令行
# 进入 oracle 命令行
su - oracle
sqlplus /nolog
# 使用 “操作系统认证” 的方式,登录oracle conn / as sysdba
conn / as sysdba
# 查询所有可用的库
select instance_name from v$instance;
# 查询所有可用的用户
show user;
注:这个阿里的镜像,所有的密码都是统一:helowin
八、测试链接(本地连接,所以可以使用system账户)
注:以上内容仅提供参考和交流,请勿用于商业用途,如有侵权联系本人删除!
边栏推荐
- 940. Different subsequences II
- SAP ABAP OData 服务 Data Provider Class 的 GET_ENTITYSET 方法实现指南试读版
- 给图片左上角加logo标识、左下角加时间和地址、地址到达指定长度换行
- 《nlp入门+实战:第七章:pytorch中数据集加载和自带数据集的使用》
- LeetCode 593 有效的正方形[数学] HERODING的LeetCode之路
- C语言操作符详解(1)
- 亚马逊登录参数metadata1,encryptedPwd逆向分析
- First thoughts on the first attempt to avoid killing without a file (Part 1)
- 4. Implementation Guide for GET_ENTITYSET Method of SAP ABAP OData Service Data Provider Class
- The Ministry of Human Resources and Social Security announced that "database operation administrator" has become a new occupation, and OceanBase participated in the formulation of occupational standar
猜你喜欢
The sword refers to Offer II 097. Number of subsequences
Official announcement!Suzhou Wujiang Development Zone launches electronic labor contract platform
《nlp入门+实战:第七章:pytorch中数据集加载和自带数据集的使用》
4. Implementation Guide for GET_ENTITYSET Method of SAP ABAP OData Service Data Provider Class
GET_ENTITYSET Method Implementation Guide for SAP ABAP OData Service Data Provider Class
亚马逊登录参数metadata1,encryptedPwd逆向分析
小程序预览pdf
解决reudx中的异步问题 applyMiddleware thunk
How to implement your personal knowledge base?
《张卫国的夏天》欢乐来袭,黄磊、刘奕君携手演绎“冤种”兄弟
随机推荐
【ORM框架:Sequelize的查询】
Come in now!!!Take you to know the basic data types of C language
4. SAP ABAP OData 服务 Data Provider Class 的 GET_ENTITYSET 方法实现指南
系列(jupyter自动保存失败)
MySQL Data Query - Union Query
爽朗的一天
[HDLBits brush questions] Verilog Language (4) Procedures and More Verilog Features section
WeChat Mini Program 31 Subcontracting Mechanism
The Ministry of Human Resources and Social Security announced that "database operation administrator" has become a new occupation, and OceanBase participated in the formulation of occupational standar
AI全流程开发难题破解之钥
Small program WeChat positioning is not accurate
c#开发知识点总结
给pdf添加已作废标识
Xshell 7 提示 “要继续使用此程序,您必须应用最新的更新或使用新版本”
02-SDRAM:自动刷新
The sword refers to Offer II 097. Number of subsequences
容器网络硬核技术内幕 (小结-下)
最小jvm源码分析
容器网络硬核技术内幕 (24) 知微知彰,知柔知刚 (上)
Second Best PyTorch Beginner Course; Thesis Writing Guide; Using µGo to Develop a Mini Compiler; Super Efficient Use of Transformer's Extension Library; Frontier Papers | ShowMeAI News Daily