yum install -y yum-utils device-mapper-persistent-data lvm2
1 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
2 安装docker-ce
3 yum install -y docker-ce
systemctl start docker
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
docker images
docker run -d -it -p 1521:1521 --name oracle11g --restart=always registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
docker run -d -it -p 1521:1521 --name oracle --restart=always --mount source=oracle_vol,target=/home/oracle/app/oracle/oradata registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
docker volume instpect 【容器名】
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=helowin
export PATH=$ORACLE_HOME/bin:$PATH
ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
su - oracle
sqlplus /nolog
conn /as sysdba
alter user system identified by YOUR_PASSWORD;
alter user sys identified by YOUR_PASSWORD;
alter profile default limit PASSWORD_LIFE_TIME UNLIMITED;
8.创建用户(可选,根据需要)
用一个具有dba权限的用户登录(sysdba),然后输入以下语句
create user 用户名 identified by 密码;
grant connect,resource,dba to 用户名;
原文:https://www.cnblogs.com/xiongmozhou/p/15218081.html