docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
1.要在%userprofile%文件夹下创建一个.wslconfig文件
2.在运行中打开%userprofile%
3.文件内容
[wsl2] kernelCommandLine = vsyscall=emulate
4.在cmd中执行wsl --shutdown
5.重启docker desktop,oracle的容器就能启动
1.切换到root用户
su - root password:helowin
2.编辑/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
3.使环境变量生效
source /etc/profile
4.创建软链接
ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
5.切换oracle用户登录sqlplus
su - oracle sqlplus /nolog conn as/ sysdba
6.更改用户密码
alter user system identified by system; alter user sys identified by sys;
7.设置密码永不过期
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
8.scott用户的开启
alter user scott account unlock; alter user scott identified by abc--密码; commit;
参考:
[1]: https://baijiahao.baidu.com/s?id=1711481608528112705&wfr=spider&for=pc