Changing your server hostname must be the first step you do when you're getting a new installation for a webserver or control panel. here's how we can change simply it.

Centos6

You could change the hostname by this simple command

 # hostname host.name.com

which is host.name.com is the hostname you want to set

Centos7

on this OS it's a little bit complicated

 # sudo nano /etc/sysconfig/network

then you have to write this line on the file

 HOSTNAME=host.name.com

then save and exit

You may need to restart the network on server/machine though this command

# /etc/init.d/network restart

#reboot

----

Don't forgot to add your hostname to hosts file, by the following command

# nano /etc/hosts

xxx.xxx.xxx.xxx host.name.com 

the ip of the server followed by the hostname then save the exit the file

 

 

Category: hosting
Views: 2625

Muhammad El-Saeed

About author
Technical writer and software engineer, he's a part of the great Brightery team that have many project on the opensource community

{{comments.length}} Comments

{{comment.name}}

{{comment.name}} · {{comment.created}}

{{sc.name}}

{{sc.name}} · {{sc.created}}

Post your comment

64x64
Reply to {{parent.name}} close

Similar Stories


Marketing

Social media agencies Dubai: Guide to knowing more

 Social media agencies Dubai: Guide to knowing moreSocial media has become an important part of good marketing strategy in this digital age.  As social media continues to grow, businesses must choose to remain relevant and reach their target  audience effectively. This is where our social media agencies…

subject Read
Marketing

SMS marketing pay as you Go, SMS marketing in Dubai, Lebanon, And UAE

Brightery SMS marketing pay as you go and SMS marketing message sample you will find here going to help you with SMS marketing in Dubai, SMS marketing UAE, And SMS marketing Lebanon.SMS Marketing pay as you Go, SMS marketing in Dubai, Lebanon, And UAEWhat is SMSSMS (Shortened from short message service)…

subject Read
Economy

Tips to hire the best agency and to find your best branding agency in the world

 Stop searching for " the best agency near me "If you're looking for the best agency with the best employment agency members, If you're looking forward to work with the best agency in the world or the best branding agency in the world.Tips to hire…

subject Read