The blog post shows steps on how to change the hostname on CentOS dedicated server. There are two different methods for changing the server hostname on CentOS.

The first method to change the server hostname on CentOS is using the “Hostname command”.

Login to your dedicated server and open the console.

Fire the following command into the console:

hostname my.server.com

Once the above command is fired, it will automatically change the server hostname on CentOS.

The second method to change the server hostname on CentOS is via the “Editing network file”.

To do this, simply fire the below command into the console:

vi /etc/sysconfig/network

Where “vi” is a file editor.

Once you enter the above command you will see something similar as shown below:

NETWORKING=”yes”
GATEWAY=”192.0.2.2″
HOSTNAME=”some.servername.com”

Now, just change the “hostname” there, save, and exit the file using the following command.

:wq

That’s it! You’re done. Following the above steps the server hostname on CentOS dedicated server will be successfully changed.

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

MailMax/Webmail Registration Problems

The client is having an issue with Mail-Max registration.URL: http://ns3.emediatecreative.com/webmail Example account: http://www.goldenenergyservices.com/webmail email: [email protected]…

How to Install Free Let’s Encrypt SSL Certificate for a Domain in Plesk?

In this article, learn to install a free Let’s Encrypt SSL Certificate for a domain…

How to Use cPanelWHM to Configure Email Notifications

How to Use cPanel/WHM to Configure Email Notifications

This article will demonstrate How to Set Up Email Notifications Using cPanel/WHM. As a VPS…