# 下载镜像
docker pull registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
# 创建文件
mkdir -p /mydata/oracle/oradata
# 授权,不授权会导致后面安装失败
chmod 777 /mydata/oracle/oradata
docker run -d \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_SID=ORCLCDB \# 下载镜像
docker pull registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
# 创建文件
mkdir -p /mydata/oracle/oradata
# 授权,不授权会导致后面安装失败
chmod 777 /mydata/oracle/oradata
docker run -d \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_SID=ORCLCDB \
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=123456 \
-e ORACLE_EDITION=standard \
-e ORACLE_CHARACTERSET=AL32UTF8 \
-v /mydata/oracle/oradata:/opt/oracle/oradata \
--name orcl19c_03 \
registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
docker logs -ft orcl19c_03
docker exec -it orcl19c_03 /bin/bash
sqlplus / as sysdba
show pdbs;
还可以通过访问https://localhost:5500/em
username:sys
password:123456
Container Name:ORCLPDB1
#删除表空间
drop tablespace CQCBZ including contents and datafiles;
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=123456 \
-e ORACLE_EDITION=standard \
-e ORACLE_CHARACTERSET=AL32UTF8 \
-v /mydata/oracle/oradata:/opt/oracle/oradata \
--name orcl19c_03 \
registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
docker logs -ft orcl19c_03
docker exec -it orcl19c_03 /bin/bash
sqlplus / as sysdba
show pdbs;
还可以通过访问https://localhost:5500/em
username:sys
password:123456
Container Name:ORCLPDB1
#删除表空间
drop tablespace CQCBZ including contents and datafiles;
【docker安装Oracle】
最新推荐文章于 2024-08-17 14:56:47 发布
该文指导如何通过Docker下载Oracle19c镜像,创建数据目录,设置权限,启动容器,并配置环境变量。接着展示了如何连接到数据库,展示PDB,以及删除表空间的操作。还提供了EMExpress的访问信息。
摘要由CSDN通过智能技术生成