Oracle Net Services 配置:LISTENER:没有为主机 VM-16-7-centos 返回有效的 IP 地址

问题描述:

[root@VM-16-7-centos oracle]# /etc/init.d/oracledb_ORCLCDB-21c configure
Configuring Oracle Database ORCLCDB.
准备执行数据库操作
已完成 8%
复制数据库文件
已完成 31%
已完成 100%
[FATAL] 

正在对命令行参数进行语法分析:
参数"silent" = true
参数"local" = true
参数"inscomp" = server
参数"insprtcl" = TCP
参数"orahome" = /opt/oracle/product/21c/dbhome_1
参数"instype" = custom
参数"listener" = LISTENER
参数"lisport" = 1521
参数"cfg" = local
参数"responsefile" = /opt/oracle/product/21c/dbhome_1/network/install/netca_typ.rsp
完成对命令行参数进行语法分析。
Oracle Net Services 配置:
LISTENER:没有为主机 VM-16-7-centos 返回有效的 IP 地址。
完成概要文件配置。
有关详细信息, 请查看跟踪文件: /opt/oracle/cfgtoollogs/netca/trace_OraDBHome21cEE-2306214下午0000.log
Oracle Net Services 配置失败。退出代码是1
已完成 8%
已完成 0%
有关详细信息, 请参阅日志文件 "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB3.log"。

Database configuration failed.

解决方案:

1.  vim /etc/hosts

127.0.0.1 VM-16-7-centos VM-16-7-centos
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4

::1 VM-16-7-centos VM-16-7-centos
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~           

修改后:

127.0.0.1 VM-16-7-centos VM-16-7-centos
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4
10.0.16.7 VM-16-7-centos VM-16-7-centos


::1 VM-16-7-centos VM-16-7-centos
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~                                                                                                                                      
~           

新增:10.0.16.7 VM-16-7-centos VM-16-7-centos

这一行,前面10.0.16.7 为本机IP,VM-16-7-centos

 

 最终结果:

[root@VM-16-7-centos oracle]# vim /etc/hosts
[root@VM-16-7-centos oracle]# /etc/init.d/oracledb_ORCLCDB-21c configure
Configuring Oracle Database ORCLCDB.
准备执行数据库操作
已完成 8%
复制数据库文件
已完成 31%
正在创建并启动 Oracle 实例
已完成 32%
已完成 36%
已完成 40%
已完成 43%
已完成 46%
正在进行数据库创建
已完成 51%
已完成 54%
正在创建插接式数据库
已完成 58%
已完成 77%
执行配置后操作
已完成 100%
数据库创建完成。有关详细信息, 请查看以下位置的日志文件:
 /opt/oracle/cfgtoollogs/dbca/ORCLCDB。
数据库信息:
全局数据库名:ORCLCDB
系统标识符 (SID):ORCLCDB
有关详细信息, 请参阅日志文件 "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB4.log"。

Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值