当前位置:网站首页>docker部署oracle
docker部署oracle
2022-07-07 12:03:00 【今朝花落悲颜色】
1.拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
2.启动容器
docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
执行 docker ps 命令确认容器启动成功

3.进行配置 ,首先执行如下命令进入 oracle容器环境中:
dockerexec-it oracle11g bash
接着执行如下命令切换到 oracle 数据库的 root 用户下(密码为:helowin)
su root
编辑 profile 文件:
vi /etc/profile
在末尾处添加如下 ORACLE 环境变量参数后保存退出:
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=helowin
export PATH=$ORACLE_HOME/bin:$PATH

接着执行如下命令创建软连接:
ln -s$ORACLE_HOME/bin/sqlplus /usr/bin
然后执行如下命令切换到 oracle 用户:
su - oracle
接着依次执行如下命令登录 sqlplus:
sqlplus /nolog
conn /assysdba
执行如下命令将 system 和 sys 两个账户的密码设为 123456:
alter user system identified by 123456;
alter user sys identified by 123456;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
我们还可以执行如下命令解锁 scott 用户,同时将其密码设置为 123456:
alter user scott account unlock;
alter user scott identified by 123456;
commit;
配置完毕后,连续执行多个 exit 即可退出容器,返回到宿主机。
连接测试,我们使用客户端工具连接下这个 Oracle 数据库(其中 SID 为 helowin),可以发现连接成功:
边栏推荐
- move base参数解析及经验总结
- 10 pictures open the door of CPU cache consistency
- [1] Basic knowledge of ros2 - summary version of operation commands
- 交付效率提升52倍,运营效率提升10倍,看《金融云原生技术实践案例汇编》(附下载)
- TPG x AIDU | AI leading talent recruitment plan in progress!
- 【日常训练】648. 单词替换
- Talk about pseudo sharing
- mysql ”Invalid use of null value“ 解决方法
- Indoor ROS robot navigation commissioning record (experience in selecting expansion radius)
- 高等数学---第八章多元函数微分学1
猜你喜欢

【堡垒机】云堡垒机和普通堡垒机的区别是什么?

DID登陆-MetaMask

AI talent cultivation new ideas, this live broadcast has what you care about

Error lnk2019: unresolved external symbol

《厌女:日本的女性嫌恶》摘录

Getting started with MySQL

MySQL error 28 and solution

118. 杨辉三角

2022-7-6 Leetcode 977. Square of ordered array
![Introduction to database system - Chapter 1 introduction [conceptual model, hierarchical model and three-level mode (external mode, mode, internal mode)]](/img/35/5224252624cc76f42cbd0fd5c81d8c.png)
Introduction to database system - Chapter 1 introduction [conceptual model, hierarchical model and three-level mode (external mode, mode, internal mode)]
随机推荐
Sliding rail stepping motor commissioning (national ocean vehicle competition) (STM32 master control)
Cinnamon taskbar speed
Milkdown control icon
MySQL error 28 and solution
Beginner XML
mysql导入文件出现Data truncated for column ‘xxx’ at row 1的原因
The reason why data truncated for column 'xxx' at row 1 appears in the MySQL import file
2022-7-6 Leetcode 977. Square of ordered array
Realization of search box effect [daily question]
Ways to improve the performance of raspberry pie
Excerpt from "misogyny: female disgust in Japan"
Data refresh of recyclerview
Mysql怎样控制replace替换的次数?
2022-7-7 Leetcode 844. Compare strings with backspace
Is it safe to open an account online now? Which securities company should I choose to open an account online?
How to check the ram and ROM usage of MCU through Keil
Parameter keywords final, flags, internal, mapping keywords internal
[daily training -- Tencent select 50] 231 Power of 2
Laravel5 call to undefined function OpenSSL cipher IV length() error php7 failed to open OpenSSL extension
Take you to master the three-tier architecture (recommended Collection)