Centos7X永久更改主机名 与 Centos6X永久更改主机名 的区别


Centos7X永久更改主机名 

修改配置文件  vim /etc/hostname  保存退出,重启系统

[root@itheima ~]# vim /etc/hostname 
itheima130.com
~                                                                                                                                                            
~                                                                                                                                                            
~                                                                                                                                                            
~                                                                                                                                                            
                                                                                                                                                          
:wq
[root@itheima ~]# reboot
......
......
[root@itheima130 ~]# 

Centos6X永久更改主机名

修改配置文件  vim /etc/sysconfig/network  保存退出,重启系统

[root@hadoop ~]# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=hadoop100
~                                                                                                                                                            
~                                                                                                                                                            
~                                                                                                                                                            
~                                                                                                                                                            
                                                                                                                                                          
:wq
[root@hadoop ~]# reboot
......
......
[root@hadoop100 ~]# 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM