| Author |
localhost and ports
|
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
hi ranchers ,
what is the range of port numbers can i assign to localhost apart from 8080 ?
suppose i want to install mysql server, glassfish server and oracle server. what about their port numbers do i have to assign different port number for each server OR can i use 8080 for all three server but in that case i can use only one sever application ?
|
 |
Rob Spoor
Saloon Keeper
Joined: Oct 27, 2005
Posts: 18370
|
|
In theory, all ports from 1 to 65535 can be used. There are some limitations though. For ports from 1 to 1024 you usually need administrative rights; under Linux you need to be root. Furthermore, several ports are already used by the system, like 137 for Windows sharing.
In your case though, MySQL can run on its default port 3306, Oracle on its default 1521 and Glassfish on 8080 without a problem.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
what if i want to install apache tomcat after glassfish already at 8080 ? Do i have to assign different port ?
one more que:
how can one know which ports are been used by the system itself ?
|
 |
Rob Spoor
Saloon Keeper
Joined: Oct 27, 2005
Posts: 18370
|
|
Yes, you will need to run Tomcat on another port if Glassfish is already using port 8080.
As for the ports, use the netstat command. You'll need to use the -a flag to see the listening connections. Alternatively, you can use CurrPorts.
|
 |
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
hi bob ,
whe i type netstat -a on command prompt (window xp)
it says : it is not recognized as internal or external command. what is problem here ?
|
 |
Rob Spoor
Saloon Keeper
Joined: Oct 27, 2005
Posts: 18370
|
|
|
No idea, every machine I have worked with has netstat. Try CurrPorts instead.
|
 |
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
|
thanks Rob.
|
 |
Akhilesh Trivedi
Ranch Hand
Joined: Jun 22, 2005
Posts: 1351
|
|
naveen yadav wrote:hi bob ,
whe i type netstat -a on command prompt (window xp)
it says : it is not recognized as internal or external command. what is problem here ?
I think netstat.exe needs to be available in \WINDOWS\system32
|
Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
|
 |
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
Akhilesh Trivedi wrote:I think netstat.exe needs to be available in \WINDOWS\system32
Yes it is available there. But when i execute it flashes for a second or two and then closed automatically.
How can i see its output ?
|
 |
Akhilesh Trivedi
Ranch Hand
Joined: Jun 22, 2005
Posts: 1351
|
|
naveen yadav wrote:Yes it is available there. But when i execute it flashes for a second or two and then closed automatically.
How can i see its output ?
Go to start->run type cmd
then try the command.
|
 |
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
Akhilesh Trivedi wrote:
Go to start->run type cmd
then try the command.
cmd says : it is not recognized as internal or external command
|
 |
Akhilesh Trivedi
Ranch Hand
Joined: Jun 22, 2005
Posts: 1351
|
|
naveen yadav wrote:
Akhilesh Trivedi wrote:
Go to start->run type cmd
then try the command.
cmd says : it is not recognized as internal or external command
Then go with Rob. Try CurrPorts instead.
|
 |
naveen yadav
Ranch Hand
Joined: Oct 23, 2011
Posts: 328
|
|
ya i'll try that out.
thanks Akhilesh.
|
 |
 |
|
|
subject: localhost and ports
|
|
|