文章

docker 安装oracle

本次安装oracle10g特此记录

docker pull registry.cn-hangzhou.aliyuncs.com/chenyl/oracle-xe-10g #下载镜像
docker images #查看镜像
docker run -d -p 1521:1521 --name oracle10g registry.cn-hangzhou.aliyuncs.com/chenyl/oracle-xe-10g #运行镜像
#其中-d表示后台运行,这样退出终端docker容器不会挂掉,--name给容器起一个名字
docker exec -it oracle10g bash #进入容器
#-i表示交互方式,t表示终端
 
#修改密码
sqlplus /nolog
connect sys/oracle as sysdba
# alter user username identified by password;
alter user system identified by "123456";
alter user sys identified by "123456";
#创建用户并设置密码
create user oracle10 identified by "123456“;
#oracle密码默认有效期是180天好像,设置这个密码不过期
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
License: