基于docker搭建oracle服务器拉取镜像
- docker pull wnameless/oracle-xe-11g
复制代码这个比较耗时,中间可能会中断,继续拉取即可 启动实例注意将selinux关掉,不然实例启动失败 - 修改/etc/selinux/config文件,设置为disable
- # disabled - No SELinux policy is loaded.
- SELINUX=disable
复制代码启动 - docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
复制代码49160是ssh访问端口,初始密码admin
49161是数据库访问端口 实例信息 - hostname: localhost
- port: 49161
- sid: xe
- username: system/sys
- password: oracle
复制代码至此服务端安装完成 客户端访问
安装完成client,启动pl-sql
设置oracle安装路径
然后登录页会出现
配置服务名
也可以直接写文件oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
- # tnsnames.ora Network Configuration File: F:\installsoft\oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
- # Generated by Oracle configuration tools.
- XE =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.201)(PORT = 49161))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = xe)
- )
- )
- ORACLR_CONNECTION_DATA =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
- )
- (CONNECT_DATA =
- (SID = CLRExtProc)
- (PRESENTATION = RO)
- )
- )
复制代码
|