docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11gdocker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11gdocker start oracle11gdocker exec -it oracle11g bashsu root- 密码:
helowin - (可选)修改root密码
passwd root
- 密码:
vi /etc/profile- 添加
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2 export ORACLE_SID=helowin export PATH=$ORACLE_HOME/bin:$PATH - 由此可知SID为
helowin, 或通过执行env | grep SID得到, 连接时用得到
- 添加
vi ~oracle/.bashrc- 添加
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2 export ORACLE_SID=helowin export PATH=$ORACLE_HOME/bin:$PATH
- 添加
source /etc/profileln -s $ORACLE_HOME/bin/sqlplus /usr/binsu oraclesqlplus /nolog- 执行不成功则
source ~oracle/.bashrc, 然后再执行一次 conn /as sysdbaALTER USER SYSTEM IDENTIFIED BY "yourpwd00";yourpwd00为你的密码, 可自定义
- 执行不成功则
- 参考链接: https://blog.csdn.net/qq_38380025/article/details/80647620

京公网安备 11010502036488号