1 环境信息
查看系统内核
[root@localhost /]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
2 虚拟机拉取镜像
此处资源获取在虚拟机中进行,完成后上传到服务器安装
2.1 拉取oracle11g镜像
[root@localhost /]# docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
2.2 导出镜像
[root@localhost /]# docker save -o /opt/module/software/jingxiang/oracle11.tar registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
3 服务器加载镜像
将提供的docker文件夹上传到服务器的 /opt/module/software/jingxiang 目录下
3.1 导入oracle11g镜像
[root@localhost /]# docker load -i /opt/module/software/jingxiang/oralce11.tar
3.2 创建目录
[root@localhost docker]# mkdir /usr/local/data_temp
3.3 目录授权
[root@localhost docker]# chown -R 500.500 /usr/local/data_temp
3.4 创建容器
[root@localhost /]# docker run -d --name oracle_11g -p 1521:1521 -v /usr/local/data_temp:/home/oracle/data_temp registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
3.5 进入容器
[root@localhost docker]# docker exec -it oracle_11g /bin/bash
3.6 进入Oracle
root@1fcf644fb24c:/# sqlplus / as sysdba
3.7 创建表空间
SQL> create tablespace art datafile '/home/oracle/app/oracle/oradata/helowin/art.dbf' size 2G reuse autoextend on next 500M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents unlimited);
3.8 创建用户
SQL> create user art identified by art default tablespace art temporary tablespace TEMP;
3.9 用户授权
SQL> grant connect,dba,exp_full_database,imp_full_database to art with admin option;
3.10 启动服务
[root@localhost docker]# docker start oralce11
3.11 停止服务
[root@localhost docker]# docker stop oralce11
3.12 服务信息
服务 oralce
版本 11g
用户名 art
密码 art
SID helowin
4 相关资源
- 下载地址 https://pan.baidu.com/s/10u4NvfAqWllg972bbNkvXQ **提取码 at56 **
- 博文不易,辛苦各位猿友点个关注和赞,然后评论区留邮箱,看到后第一时间发