[root@iZbp13sno1lc2yxlhjc4b3Z ~]# docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
[root@iZbp13sno1lc2yxlhjc4b3Z ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g latest 3fa112fd3642 4 years ago 6.85GB
[root@iZbp13sno1lc2yxlhjc4b3Z ~]#docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
[root@iZbp13sno1lc2yxlhjc4b3Z ~]# docker exec -it oracle11g bash
[oracle@753d0436c2f1 /]$ vi /etc/profile
# /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
[oracle@753d0436c2f1 /]$ vi /home/oracle/.bashrc
# .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 /home/oracle/.bashrc
[oracle@753d0436c2f1 /]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Thu May 14 20:57:07 2020
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected.
SQL>
SQL> alter user system identified by system;
User altered.
SQL> alter user sys identified by sys;
User altered.
SQL>
[oracle@753d0436c2f1 /]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 14-MAY-2020 21:00:56
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-MAY-2020 09:25:18
Uptime 2 days 11 hr. 35 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/753d0436c2f1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=753d0436c2f1)(PORT=1521)))
Services Summary...
Service "helowin" has 1 instance(s).
Instance "helowin", status READY, has 1 handler(s) for this service...
Service "helowinXDB" has 1 instance(s).
Instance "helowin", status READY, has 1 handler(s) for this service...
The command completed successfully
PLSQL客户端连接
用户:sys,密码:sys,数据库:你的IP地址/helowin,以sysdba角色登录即可。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。