1.拉去oracle数据库镜像
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g 
2.启动oracle  自动启动镜像 --restart=always
docker run -p 1521:1521 --name oracle_11g -d --restart=always registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
3.进入控制台设置用户信息 
docker exec -it oracle_11g bash
4.切换到root用户模式下
su root
输入密码helowin
5.编辑profile文件vi /etc/profile配置ORACLE环境变量
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=helowin
export PATH=$ORACLE_HOME/bin:$PATH
7.重启配置文件服务
source /etc/profile
8.建立sqlplus软连接
ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
9.切换到oracle用户,修改oracle的相关账号密码
>su oracle
登录sqlplus并修改sys、system用户密码
>sqlplus /nolog
>conn /as sysdba
>alter user system identified by oracle;
>alter user sys identified by oracle;
>ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

远程登录账号是system/oracle

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐