728x90
hostname 영구 변경
#CentOS 6
[root@localhost ~]# vi /etc/sysconfig/network
HOSTNAME=myhost
#CentOS 7
[root@localhost ~]# hostnamectl set-hostname myhost
#CentOS 6
일반적인 Hostname 변경 ( 적용을 위해 rebooting 필요 )
바로 적용할 경우 위 방법후
shell> echo hostname > /proc/sys/kernel/hostname
shell> echo AP_NMS > /proc/sys/kernel/hostname
echo DRBD1 > /proc/sys/kernel/hostname
재접속하면 적용된것을 확인 할수있다.
728x90
'리눅스' 카테고리의 다른 글
서버 네트워크 Duplex 강제 설정 (0) | 2018.11.09 |
---|---|
리눅스 파일명 일괄 수정 (0) | 2018.11.09 |
로그log 압축후 삭제 (0) | 2018.11.09 |
Yum이 안될떄 (0) | 2018.11.09 |
scp 전송이 안될떄 확인 (0) | 2018.11.09 |