BLACK FRIDAY DEALS

Knowledge Base

Allows you to search a variety of questions and answers

Search

Search results

General Server Questions

This solution will work on all RH-based operating systems.

1. Login to your server as 'root' and run
#vi /etc/hosts - this will open up the /etc/hosts file using VIM editor
2. Change the values after your server's main IP address to reflect your desired hostname. You must put in a valid hostname, one that will resolve as one of the options. Example:
127.0.0.1 localhost
1.1.1.1 myhostname.mydomain.com myhostname
3. After you are finished, save the file by running
:wq
4. When you're back at the prompt, run
#vi /etc/sysconfig/network
5. In the network file, next to your IP, change the current value with your new valid hostname (myhostname.mydomain.com)
6. When you're done, save the file
:wq

If the hostname did not take effect automatically (as it should), issue a server wide reboot for these effects to take change
#shutdown -r now


Wait for the machine to come back up and double check your new hostname by running the #hostname command.

Just to note, you can also check to make sure that /proc/sys/kernel/hostname has also been updated to the new hostname.

See What Our Customers Say

Leave review
H

heyin

good

Read full review
J

Johnny

NC, United States

Hi Guys and Gals, I'll just say you all are top notch and go above and behind with support. I'v...

Read full review
S

seoSpaceship.com

NC, United States

AYK Solutions offers unmatched top tier support. They have gone above and beyond time and time agai...

Read full review
J

James Oliver Cyr, M

AZ, United States

AYK Solutions has been the server for my website for 8 or 9 years, and in all that time I have gotte...

Read full review
ARIN Cisco Supermicro cPanel Intel Microsoft