Link to home
Start Free TrialLog in
Avatar of edreamers
edreamers

asked on

Access Computers by Name not by IP

I have a server running on CentOS 6.3. I am running a accounting software with tomcat web server. My question is that when other computer access the application hosted on tomcat on my local server they have to write my Server IP address and then port no. on which application is hosted. eg. 172.164.1.185:8080

I want instead of knowing my server IP address and port no. they just write my Server name and application is accessible to them.
e.g. accounts.org or university.org


I want to make clear that i am in a INTRA-NET environment and no computer except server can access internet in our LAN.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

You could put your server name in DNS somewhere in your network but that will Not take care of the port number.  Since it is not on the standard port 80, they will always have to add it to the address.  The only way to get around that is for them to create a shortcut on their desktop or browser that includes all the necessary info.  The shortcut can have any name they want.
Avatar of edreamers
edreamers

ASKER

I am new to Linux so kindly tell me step by step to how to add DNS name in CentOS
You need to talk to your network administrator, they should be the person who sets up DNS for your network.
You need to use DNS if you want to use hostname instead of ip address. If NetworkManager  is running, you will need to add the DNS server in your ifcfg files; else you need to add them to /etc/resolv.conf

Can you post your output of /etc/sysconfig/network-scripts/ifcfg-eth0?
You can add the server name to the client machines hosts file.  You will still need to use the port number at the end though.

As root do this:

echo "172.164.1.185 accountapp" >> /etc/hosts

Then you can open a broswer and point it to:

http://accountapp:8080
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
let me check.
I tried many times but not able to succeed. So I am migrating to windows Platform. Thanx everyone for their support.