setting up my hostname
1). How to setup a host name? as I know a host name can be anything u make up, but what about the domain name, can I pick any domain name i want as well?
2). Do I have to associate my ip with the hostname under the HOST tab in network config? If I do, what should I put in the alias field? 3). if all of the above has been done correctly, would there be any problem accessing to my computer from a remote host by ssh? or I need to config something else? I know these may sound stupid, but I really need someone to help me on this. I am using redhat 7.2, thx |
set the hostname in /etc/hosts. if u are running a local DNS server, u can set up any domain name you want. that way, u can do 'host based' resolution within your network.
if you only do the hostname assignment via /etc/hosts, remote machines won't know it. u need to set the hostname with the corresponding IP address to other machine's hosts file. |
Here is an example: say my hostname is "nyteshyft", and the domain name that i am associated with is called "nyteshyft.org", and that my IP address is "128.1.1.2".
Code:
edit /etc/sysconfig/network, modify the following entries: Code:
# hostname Code:
127.0.0.1 localhost.localdomain.com localhost Code:
search nyteshyft.org Code:
hosts: dns files |
everything i clear, except the part that to configure etc/resolv.conf and etc/nsswitch.conf, what are they doing? what would be the ip of the nameserver?
In etc/nsswitch.conf, I just type in "hosts: dns files", or i have to fill in other information, can u make a concrete example? also what does the localhost thing do, i read some web page and it says that local host is for some special use. |
All times are GMT -5. The time now is 07:28 PM. |