https://blog.youkuaiyun.com/zwx521515/article/details/77982884
具体参考上面大神的博客(按照以上成功装好了环境,每次关机重新连数据库的话都需要敲很多,直接连不行)应该是docker持久话,要commit一个新镜像
docker ps -a //查看所有正在运行的容器
docker images /查看镜像信息
docker stop comtainerId //停止
docker stop name
docker start oracle_11g //启动oracle
docker exec -it oracle_11g bash //进入oracle容器
su root
密码 helowin(也是数据库实例名)
---------------------
切换root权限第一次要编辑profile文件配置ORACLE环境变量
vi /etc/profile 并在文件最后添加如下命令 。 (i编辑 :wq保存并退出)
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 //软件连接
已经创建过会显示 。 /usr/bin/sqlplus : File exists
su - oracle . // 切换回oracle
sqlplus 用户名/密码@数据库实例名
sqlplus cyj/cyj@helowin
SQL>