当前位置:网站首页>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容器环境中:
docker
exec
-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 /
as
sysdba
执行如下命令将 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),可以发现连接成功:
边栏推荐
- requires php ~7.1 -> your PHP version (7.0.18) does not satisfy that requirement
- Clickhouse (03) how to install and deploy Clickhouse
- Excellent open source system recommendation of ThinkPHP framework
- Talk about pseudo sharing
- requires php ~7.1 -> your PHP version (7.0.18) does not satisfy that requirement
- SSRF漏洞file伪协议之[网鼎杯 2018]Fakebook1
- Cargo placement problem
- 【堡垒机】云堡垒机和普通堡垒机的区别是什么?
- Detr introduction
- ES日志报错赏析-Limit of total fields
猜你喜欢
2022-7-7 Leetcode 34. Find the first and last positions of elements in a sorted array
Error lnk2019: unresolved external symbol
Sliding rail stepping motor commissioning (national ocean vehicle competition) (STM32 master control)
Vmware 与主机之间传输文件
Ways to improve the performance of raspberry pie
使用day.js让时间 (显示为几分钟前 几小时前 几天前 几个月前 )
[fortress machine] what is the difference between cloud fortress machine and ordinary fortress machine?
Ogre introduction
实现IP地址归属地显示功能、号码归属地查询
Milkdown control icon
随机推荐
得物客服热线的演进之路
手把手教会:XML建模
Es log error appreciation -limit of total fields
move base参数解析及经验总结
[high frequency interview questions] difficulty 2.5/5, simple combination of DFS trie template level application questions
Thread pool reject policy best practices
toRaw和markRaw
Huawei image address
[1] ROS2基础知识-操作命令总结版
Is it safe to open an account online now? Which securities company should I choose to open an account online?
Move base parameter analysis and experience summary
[daily training -- Tencent select 50] 231 Power of 2
Mysql怎样控制replace替换的次数?
高等数学---第八章多元函数微分学1
THINKPHP框架的优秀开源系统推荐
The difference between memory overflow and memory leak
Advanced Mathematics - Chapter 8 differential calculus of multivariate functions 1
[daily training] 648 Word replacement
请问,在使用flink sql sink数据到kafka的时候出现执行成功,但是kafka里面没有数
Help tenants