当前位置:网站首页>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账户)

注:以上内容仅提供参考和交流,请勿用于商业用途,如有侵权联系本人删除!
边栏推荐
- leetcode122. Best Time to Buy and Sell Stock II
- [ACTF2020 Freshman Competition]Exec 1
- Use the PostgreSQL GRANT command to modify permissions on various database objects
- 大陆泽、宁晋泊蓄滞洪区防洪工程与安全建设项目启动实施
- 组合模式(Composite Pattern)
- leetcode122. Best Time to Buy and Sell Stock II 买卖股票的最佳时机 II(简单)
- 基于PaddleSpeech搭建个人语音听写服务
- 南信大提出TIPCB,一个简单但有效的用于基于文本的人员搜索的基于部分的卷积baseline
- 容器网络硬核技术内幕 (23) 权利,知识与责任
- 2022了你还不会『低代码』?数据科学也能玩转Low-Code啦!
猜你喜欢

《nlp入门+实战:第七章:pytorch中数据集加载和自带数据集的使用》

Fully automated machine learning modeling!The effect hangs the primary alchemist!

小程序预览pdf

Writing Elegant Kotlin Code: Talk About What I Think "Kotlinic"

微信小程序 31 分包机制

iNFTnews | 福布斯的Web3探索

全系都更换带T四缸,安全、舒适一个不落

SAP ABAP OData 服务 Data Provider Class 的 GET_ENTITYSET 方法实现指南试读版

bright day

WeChat Mini Program 30 Customizing Templates and Obtaining User Login Credentials
随机推荐
In 2022, you still can't "low code"?Data science can also play with Low-Code!
1. Promise usage in JS, 2. The concept and usage of closures, 3. The difference between the four methods and areas of object creation, 4. How to declare a class
大陆泽、宁晋泊蓄滞洪区防洪工程与安全建设项目启动实施
2022了你还不会『低代码』?数据科学也能玩转Low-Code啦!
24小时伦敦金走势图分析
PointPillars 工程复现
The sword refers to Offer II 097. Number of subsequences
南华早报 | 助力亚洲最具公信力报章实现AD域自动化管理
IDEA 快捷键
Get the Qiniu cloud address file and save it locally
PyQt5学习一(环境搭建)
leetcode122. Best Time to Buy and Sell Stock II 买卖股票的最佳时机 II(简单)
微信小程序 31 分包机制
华为畅享50 Pro评测:HarmonyOS加持 更流畅更安全
刚重装的win7系统不能上网(深度系统安装步骤)
4. Implementation Guide for GET_ENTITYSET Method of SAP ABAP OData Service Data Provider Class
[ACTF2020 Freshman Competition]Exec 1
普洛斯荣获两项“数据中心绿色等级评估”5A级认证
MySQL - Design game user information table
OneNote 教程,如何在 OneNote 中做笔记?
