To change your server’s hostname manually on CentOS / RHEL is quite easy. Simply edit the file /etc/sysconfig/network with your favorite text editor and change the value of the HOSTNAME parameter to the new hostname. Your configuration file should look something like this:
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=”newhostname.domainname.com”
GATEWAY=”192.168.0.1″GATEWAYDEV=”eth0″
FORWARD_IPV4=”yes”
You’ll also need to replace all occurencies of your old hostname in /etc/hosts. If your Linux box uses DHCP to obtain its IP address, you’ll also need to edit /etc/dhclient-eth0.conf (assuming your ethernet adapter is named eth0) and adjust the send host-name parameter correctly.
When you’re done, reboot your computer for the change to take effect.
| 1 | InMotion Hosting - $5.95 |
| 2 | WebHostingHub - $4.95 |
| 3 | iPage - $2.99 |
| 4 | JustHost - $3.45 |
| 5 | HostGator - $4.95 |
| 6 | FatCow - $3.67 |
| 7 | GreenGeeks - $4.95 |
| 8 | HostMonster - $5.95 |
| 9 | BlueHost - $6.95 |
| 10 | GoDaddy - $4.31 |
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment