Docker如何拉取oracle11g镜像
拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
查看镜像
docker images

启动容器
docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
进入镜像配置
docker exec -it oracle bash
进行软连接:
sqlplus /nolog
发现没有这个命令:
切换到root用户下:
su root
密码:helowin
编辑profile文件配置ORACLE环境变量:
vi /etc/profile
追加下面的配置:
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2 export ORACLE_SID=helowin export PATH=$ORACLE_HOME/bin:$PATH
刷新profile
source profile
切换到oracle用户:
su - oracle
登录sqlplus并修改sys、system用户密码:
sqlplus /nolog conn /as sysdba
修改密码:
alter user system identified by system; alter user sys identified by sys;
注意:如果修改密码时提示数据库没有打开:(database not open)
输入:
alter database open;
如果提示(database not mounted)
输入:
alter database mount;
最后刷新表:
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
使用Navicat连接
首先查看oracle 的 lsnrctl 服务:

随便选一个填入:服务名字段

即可连接成功。
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持。
栏 目:其它服务器
本文地址:https://zz.feitang.co/server/28577.html
您可能感兴趣的文章
- 12-22nginx代理实现静态资源访问的示例代码
- 12-22Docker 存储管理的几种方式
- 12-22nginx静态资源的服务器配置方法
- 12-22Docker Compose部署微服务项目上线功能
- 12-22GPU服务器的多用户配置方法
- 12-22docker-compose搭建etcd集群的实现(三节点)
- 12-22docker中mysql开启日志的实现步骤
- 12-22Linux下docker安装mysql8并配置远程连接
- 12-22docker部署mysql8并设置可远程连接
- 12-22阿里云oss对象存储使用详细步骤


阅读排行
推荐教程
- 12-11docker存储目录迁移示例教程
- 12-10docker start启动容器后仍然exit状态的解决
- 12-10Linux下如何安装Logstash
- 12-19Zabbix SAML SSO 登录绕过漏洞的操作流程
- 12-15Docker-Compose搭建Spark集群的实现方法
- 12-14Docker Desktop无法正常启动解决(failed to start...)
- 12-14k8s 与docker空间使用分析与清理方法
- 12-13k8s编排之Deployment知识点详解
- 12-13Nginx IP封禁及自动封禁IP的实现
- 12-13Nginx代理Partainer如何使用





