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