연구개발/MYSQL
CentOS7 hostname 변경
HEAD1TON
2015. 2. 7. 01:18
hostnamectl이라는 명령어가 추가 되었는데, 이 명령을 이용해 hostname을 조작할 수 있다.
1. hostname 상태 확인하기
$ hostnamectl status
Static hostname: centos7-test-01.com2us.kr
Icon name: computer
Chassis: n/a
Machine ID: 7a39a64ab05f4ea4bbf9a4276742f691
Boot ID: c072988dc26f41e8b9f26dd2090f8bb3
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-123.el7.x86_64
Architecture: x86_64
2. hostname 변경하기
$ hostnamectl set-hostname [호스트명]
$ vi /etc/hostname