This is a repost of my origional HOWTO on changing the hostname of your server. It is identical to my origional post but with some clarification.
My tutorial site is still down, somebody thought it was ok to delete my nameservers so until then this post will remain.
If you want to keep your warranty, and you do not want to break Ensim, you will NOT use linuxconf. Do not use it!
If this file contains "ensim.rackshack.net" anywhere it is WRONG! Ensim.rackshack.net should NOT be anywhere in this file!
Somthing like this
216.40.226.??? srv01.yourdomain.com ensim.rackshack.net
or
216.40.226.??? srv01.yourdomain.com ensim
or
216.40.226.??? srv01.yourdomain.com ensim.rackshack.net ensim
ALL OF THE ABOVE IS ABSOLUTELY INCORRECT!!!!!!!!!!!!!!
1) SSH to your box
2) login as root
3) type pico /etc/hosts
4) modify the line that says
You will be changing this line from
xxx.xxx.xxx.xxx ensim.rackshack.net ensim
to
216.40.226.??? srv01.yourdomain.com srv01
Substitue the above ip for your own, and same with the server name. Change that to your own. It can be anything but it must contain at least 2 periods in the name and preferably ending in com or some other tld eg, net, cc, tv or whatever. See my example above!
YOU MUST keep the format of this file correct or else you will have all kind of problems. The proper way of entering the above is as follows:
The origional /etc/hosts file looks like this:
127.0.0.1|tab|localhost.localdomain|tab|localhost
216.40.xxx.xxx|tab|ensim.rackshack.net|tab|ensim
You need to change it to look like this
127.0.0.1|tab|localhost.localdomain|tab|localhost
216.40.xxx.xxx|tab|srv05.primenet.cc|tab|srv05 <-- only line that changes
|tab| = USE your tab key everytime you see the words |TAB|, see above. Its the caps lock key on the left side of your keyboard!!
DO NOT USE YOUR SPACE BAR to create space. As mouse says, TAB is your friend.
NOTE: There is only ONE tab between each!!!!
The format above is EXACTLY the format thats produced when using LINUXCONF to change your server name, but since we DONT recommend that you use LINUXCONF because of Ensim, it could break your box, we do it manually by producing the IDENTICAL format of what LINUXCONF would produce. Linuxconf would never create formats of the host file that look like 99% of those i'v seen posted.
type cntrl-x and save your file.
5) type pico /etc/sysconfig/network and modify the second line in file network to match the address of your server name as you did in step 4:
NETWORKING=yes
HOSTNAME="ensim.rackshack.net"
GATEWAY="216.40.226.1"
GATEWAYDEV="eth0"
FORWARD_IPV4="yes"
So you would change the line
HOSTNAME="ensim.rackshack.net"
to
HOSTNAME="srv01.yourdomain.com"
Save with a ctrl-x
/sbin/reboot
If your webppliance refuses to restart, you've made an error. Check your tabs folks, check the format of the /etc/hosts file. Most importantly, make sure you have not introduced any NEWLINES. Did you remember to reboot, see above!
When using pico your cursor should be sitting here prior to saving the file.
216.40.xxx.xxx|tab|srv05.primenet.cc|tab|srv05 |<-- HERE
not
216.40.xxx.xxx|tab|srv05.primenet.cc|tab|srv05
|<-- HERE -or
|<-- HERE
Need more help? Visit this post http://forum.rackshack.net/showthread.php?...65115#post65115
Your Done!