How to modify hostname by CentOS6.6
This article introduces the relevant knowledge of "how to modify the host name of CentOS6.6". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Edit / etc/sysconfig/network
[root@localhost ~] # vi / etc/sysconfig/network
NETWORKING=yes
HOSTNAME=hadoop-01
Direct naming of 2.hostname
[root@localhost ~] # hostname hadoop-01
3. Edit / etc/hosts
[root@localhost ~] # cat / etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.137.130 hadoop-01
4.exit, come back in.
This is the end of the content of "how to modify the host name of CentOS6.6". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!