How to properly change Hostname on OVH Servers

0 131

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:

(Here replace the 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
cat /etc/sysconfig/network

now save and exit by entering :wq

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

now save and exit by entering :wq

/etc/init.d/network restart

That’s it

Leave A Reply

Your email address will not be published.