赞
踩
环境:centos7,Docker 20.10.0,安装oracle12c
选择了 truevoly/oracle-12c镜像
docker pull truevoly/oracle-12c
查看已经拉取的镜像
docker images
docker run -d --name oracle -m 1g -p 8080:8080 -p 1521:1521 -v $PWD/data:/mnt -e TZ=Asia/Shanghai truevoly/oracle-12c
-m 做 内存限制
-p 做 端口映射
-v 做数据卷 (路径自己调整)
docker exec -it oracle /bin/bash
找到 sqlplus 启动
/u01/app/oracle/product/12.1.0/xe/bin
启动命令
./sqlplus /nolog
conn sys/oracle as sysdba
修改密码 创建用户 赋权
alter user sys identified by newpassword;
alter user system identified by newpassword;
create user xxx identified by password;
grant create session to xxx;
grant create table,unlimited tablespace to xxx;
grant select any table to xxx;
GRANT UPDATE ANY TABLE,DROP ANY TABLE,INSERT ANY TABLE TO xxx;
alter system set O7_DICTIONARY_ACCESSIBILITY=true scope=spfile;
打开 navicat 进行连接
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。