#刚开始直接root用户登录,在etc目录,切换到oracle,输入lsnrctl start启动oracle时提示"lsnrctl: command not found"
[root@loveyao_test etc]# su oracle
[oracle@loveyao_test etc]$ lsnrctl start
bash: lsnrctl: command not found#切换回root用户,cd /根目录, 再次su - oracle ,输入lsnrctl start启动oracle,这次正常啦.
[oracle@loveyao_test ~]$ cd /
[oracle@loveyao_test /]$ su -root
su: invalid option -- 'r'
Try `su --help' for more information.
[oracle@loveyao_test /]$ su - root
Password:
[root@loveyao_test ~]# su - oracle
[oracle@loveyao_test ~]$
[oracle@loveyao_test ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-JUL-2016 22:06:57
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/loveyao_test/listener/alert/log.xml
Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Linux Error: 25: Inappropriate ioctl for device
Listener failed to start. See the error message(s) above...
[oracle@loveyao_test ~]$
#如上所示: oracle启动失败,提示"Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12545: Connect failed because target host or object does not exist"
#hosts文件导致,切换root修改hosts文件,重新启动oracle可以正常启动. 具体操作如下:
[oracle@loveyao_test alert]$ su - root
Password:
[root@loveyao_test ~]#
[root@loveyao_test ~]#
[root@loveyao_test ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
~
#将hosts文件localhost 修改成主机名hostname的名字,
注意: vi /etc/sysconfig/network 文件可以修改hostname的名字(这里修改后需要重启系统).
[root@loveyao_test ~]# vi /etc/hosts
127.0.0.1 loveyao_test localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
~
[root@loveyao_test ~]# su - oracle
[oracle@loveyao_test ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-JUL-2016 22:23:22
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/loveyao_test/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=loveyao_test)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 04-JUL-2016 22:23:22
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/loveyao_test/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=loveyao_test)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@loveyao_test ~]$
#查看oracle监听端口1521
[oracle@loveyao_test ~]$ ss -tanl
Recv-Q Send-Q Local Address:Port Peer Address:Port
0 128 :::111 :::*
0 128 *:111 *:*
0 128 :::1521 :::*
0 128 :::25493 :::*
0 128 :::22 :::*
0 128 *:22 *:*
0 128 127.0.0.1:631 *:*
0 128 ::1:631 :::*
0 100 ::1:25 :::*
0 100 127.0.0.1:25 *:*
0 128 *:39108 *:*
[oracle@loveyao_test ~]$
网站设计制作、
成都网站建设,成都做网站公司-
创新互联公司已向1000+企业提供了,网站设计,网站制作,网络营销等服务!设计与技术结合,多年网站推广经验,合理的价格为您打造企业品质网站。
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
标题名称:oracle启动错误提示---hostname原因导致-创新互联
分享网址:
http://cdxtjz.com/article/issig.html