Flash News 24/7

How to properly change Hostname on OVH Servers

0 28

Many people found difficulty in changing hostname fully on OVH server, its quite easy if you are also having issue, just follow the steps below:
Login to your server with SSH as root

Now issue the command below:
hostname server.xyz.com

(Here replace the server.xyz.com with your fully qualified nameserver)

Now we will edit the network file, i prefer vi but you can use other file editors like nano
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server.xyz.com
GATEWAY=148.XXX.XX.XXX
cat /etc/sysconfig/network

now save and exit by entering :wq

Now we will edit the host file
vi /etc/hosts
cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
148.XXX.XX.XXX server.xyz.com server

now save and exit by entering :wq

finally:
/etc/init.d/network restart

That’s it

Leave A Reply

Your email address will not be published.