Fork me on GitHub

Docker安装Oracle11g

拉取镜像

#拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
#查看镜像
docker images

镜像比较大(6.9G),可能拉取时间会很久,需要耐心等待
image

创建容器

docker run -d -p 1521:1521 --name oracle registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
#查看运行的容器
docker ps

进入容器

docker exec -it oracle /bin/bash

image

操作oracle

cd /home/oracle/
#source是为了使环境变量生效,不生效时不识别ORACLE_BASE等环境变量
source .bash_profile

#登录oracle
sqlplus /nolog
#以管理员身份进行连接
conn /as sysdba

#更改默认密码,新建用户
alter user system identified by system;
alter user sys identified by sys;

create user oracle identified by oracle;
grant connect,resource,dba to oracle;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
alter system set processes=2000 scope=spfile;

image

参考: https://www.cnblogs.com/mike666/p/13999397.html

posted @   秋夜雨巷  阅读(169)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 百万级群聊的设计实践
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
历史上的今天:
2019-03-30 Mysql批量添加数据
2019-03-30 Mysql5.7出现this is incompatible with sql_mode=only_full_group_by
点击右上角即可分享
微信分享提示