How to properly change Hostname on OVH Servers

0 192

Get real time updates directly on you device, subscribe now.

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

Get real time updates directly on you device, subscribe now.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More