Changing server hostname and domain name
I have a remote server that I run sendmail and the apache webserver on. When the server was originally setup by the company I rent it from it was given a hostname in the form of host.domain.com? I thought a host name should be just host without the domain.com? They also gave the domainname the same host.domain.com?
Is it possible to change the hostname and domainname to reflect my own personal hostname and domainname (not the server company's host and domain) without causing networking problems?
I have my own domain name (ie. mydomain.com) and I have created a CName record for it called server (ie. server.mydomain.com). What I'd like to do is change the hostname to 'server' and the domainname to 'mydomain.com'. Here are the only 2 steps I can think of to do this but I'd like confirmation from experts before I do it so I don't screw my system!
If there are more steps required please post them...
TIA.
Step 1: edit the /etc/sysctl.conf file and add these settings....
# Set the host and domainname
kernel.domainname = mydomain.com
kernel.hostname = server
Step 2: edit /etc/sysconfig/network file to reflect
HOSTNAME=server
|