oracle linux vm install: 为这个监听器提供的端口 1521 当前正在使用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21222018/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
oracle linux vm install: port 1521 provided for this listener is currently in use
提问by user3203552
I am having issues installing oracle 11g R2 on my linux virtual machine. I am doing this for school so am a beginner at this stuff. The instructor tells us run ifconfig
and then run cat /etc/hosts.
First of all he says that our output should look like the following:
我在我的 linux 虚拟机上安装 oracle 11g R2 时遇到问题。我正在为学校做这件事,所以我是这方面的初学者。讲师告诉我们先运行 ifconfig,然后再运行 cat /etc/hosts。
首先,他说我们的输出应该如下所示:
eth0 Link encap:Ethernet HWaddr 00:0C:29:88:22:36
inet addr:192.168.1.57 Bcast:192.168.1.255 Mask:255.255.255.0
:
[root@OraLinux ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.57 oralinux oralinux.localdomain
here the IP addresses match.
此处 IP 地址匹配。
Mine looks like this:
我的看起来像这样:
eth2 Link encap:Ethernet HWaddr 00:0C:29:B2:E2:A9
inet addr:192.168.102.129 Bcast:192.168.102.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feb2:e2a9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10247 (10.0 KiB) TX bytes:2250 (2.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:136 errors:0 dropped:0 overruns:0 frame:0
TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11488 (11.2 KiB) TX bytes:11488 (11.2 KiB)
[oracle@OraLinux ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.153.131 oralinux oralinux.localdomain**
he then says if the IP addresses don't match run netca and add the port listner on 1521. When I try to do this netca throws me a message saying that port 1521 is already in use and that I cannot configure properly until I resolve the issue. Can someone please help me.
然后他说如果 IP 地址不匹配运行 netca 并在 1521 上添加端口监听器。问题。有人可以帮帮我吗。
回答by farhan
I encountered and solve this problem today..
我今天遇到并解决了这个问题..
Turns out the solution is:
原来解决方法是:
1) Your ethernet adapter IP address must match with the one you configured in /etc/hosts
1) 您的以太网适配器 IP 地址必须与您在 /etc/hosts 中配置的地址匹配
2) Your system/VM must be connected to LAN
2) 您的系统/VM 必须连接到 LAN
Otherwise, it will say 1521 is being used. Hope it helped. Cheers.
否则,它会说正在使用 1521。希望它有所帮助。干杯。
回答by huageorg
check the hosts ip,if the hosts ip is not right, it will also cause the listener's problem.
检查hosts ip,如果hosts ip不对,也会造成监听器的问题。
In my case, I check the ip fistly, ifconfig -a, and then change hosts following:
就我而言,我首先检查 ip,ifconfig -a,然后更改主机如下:
[root@oracle-one ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.101 oracle-one
回答by y?s??la
You are probably already running Oracle Listener on this port - 1521. Run ifconfig -a
to see all network interfaces. lsnrctl status
to see default listener status - is it running, what port, etc. You need to find what ip addresses your computer has assigned with ifconfig
and create a listener that will listen on this network interface.
您可能已经在此端口 - 1521 上运行 Oracle 侦听器。运行ifconfig -a
以查看所有网络接口。lsnrctl status
查看默认侦听器状态 - 它是否正在运行,什么端口等。您需要找到您的计算机分配的 IP 地址ifconfig
并创建一个侦听器来侦听此网络接口。
回答by Guntram Blohm supports Monica
Something else might be using port 1521. Try netstat -ntap | grep 1521
to find out what it is (you need to be root for this to work).
其他东西可能正在使用端口 1521。试着netstat -ntap | grep 1521
找出它是什么(你需要是 root 才能工作)。
回答by user3203552
What I had to do was log in as root and move to the etc directory. From there I made a copy of the hosts file and changed the original file so that the ip address matched the address I received when I performed the ifconfig in Konsole. Thank you all for the help.
我必须做的是以 root 身份登录并移动到 etc 目录。从那里我复制了主机文件并更改了原始文件,以便 IP 地址与我在 Konsole 中执行 ifconfig 时收到的地址相匹配。谢谢大家的帮助。