一台服务器上安装多个不同版本的oralce

环境:
OS:Centos 6.9

服务器1台
目前已经在运行了oralce 11g 安装目录/u01
计划安装12c,安装目录u02

 

新用户使用oracle01账号,该账号需要与oralce账号同在相同的组(dba,oinstall)

 

1.安装提示要执行的脚本:

复制代码
[root@localhost db]# /u02/app/oracle/product/12.2.0.1/db_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle01
    ORACLE_HOME=  /u02/app/oracle/product/12.2.0.1/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] : 
no
复制代码

 

2.添加一个不同端口的监听器
在新用户oracle01下添加

复制代码
[oracle01@localhost admin]$ more listener.ora 
# listener.ora Network Configuration File: /u02/app/oracle/product/12.2.0.1/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER12C =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = host11g)(PORT = 1522))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
    )
  )
复制代码

 

3.修改新数据库的参数local_listener
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=host11g)(PORT=1522))' scope=both;

 

4.查看状态

复制代码
[oracle01@localhost admin]$ lsnrctl status LISTENER12C

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 14-OCT-2022 11:15:34

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host11g)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER12C
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                14-OCT-2022 11:07:25
Uptime                    0 days 0 hr. 8 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u02/app/oracle/product/12.2.0.1/db_1/network/admin/listener.ora
Listener Log File         /u02/app/oracle/diag/tnslsnr/host11g/listener12c/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host11g)(PORT=1522)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
Services Summary...
Service "ora12c" has 1 instance(s).
  Instance "ora12c", status READY, has 1 handler(s) for this service...
Service "ora12cXDB" has 1 instance(s).
  Instance "ora12c", status READY, has 1 handler(s) for this service...
The command completed successfully
复制代码

 

posted @   slnngk  阅读(372)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2021-10-14 vault应用例子(禁止sys用户访问其他用户下的表)
点击右上角即可分享
微信分享提示