아래 명령어로 호스트네임 변경시 /etc/hosts 파일 속의 호스트네임은 변경되지 않는다.

 

$ sudo scutil --set HostName 새호스트명

 

 

 

그래서 오라클 접속시 “ORA-24454: client host name is not set” 에러가 발생하고 접속이 안된다.

 

아래와 같이 해결한다.

 

[변경전 /etc/hosts]

ELLORDNET-MPR:apache ellord$ cat /etc/hosts

##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost

fe80::1%lo0 localhost

# BEGIN section for OpenVPN Client SSL sites

127.94.0.1 client.openvpn.net

 

# END section for OpenVPN Client SSL sites


 

1. 변경된 호스트네임으로 /etc/hosts 파일에 추가해 쓴다.

아래 ${HOSTNAME} 은 자신의 호스트네임 호출하는 시스템변수이므로 아래 명령어 그대로 입력한다.

스크린샷에서 보듯이 이 호스트의 호스트네임은 ELLORDNET-MPR 이므로 아래 ${HOSTNAME} 은 ELLORDNET-MPR 로 저장이 될 것이다.

 

 

$ sudo /bin/bash -c "echo '127.0.1.1 ${HOSTNAME}' >> /etc/hosts"

 

 

 

2.  또는 /etc/hosts 파일을 직접 편집해도 된다.

 

 

 

[변경후 /etc/hosts]

 

ELLORDNET-MPR:apache ellord$ cat /etc/hosts

##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost

fe80::1%lo0 localhost

# BEGIN section for OpenVPN Client SSL sites

127.94.0.1 client.openvpn.net

# END section for OpenVPN Client SSL sites

 

127.0.0.1 ELLORDNET-MPR


 

마지막에 

127.0.0.1 ELLORDNET-MPR 

이 추가되어 있다

 

 

 

'ORACLE' 카테고리의 다른 글

Error : ORA-00911: invalid character  (0) 2019.01.08
오라클 MERGE INTO 사용법  (0) 2019.01.08
오라클 create table with comment 기본  (0) 2019.01.08
오라클 테이블 CONSTRAINT  (0) 2019.01.08
오라클 시퀀스  (0) 2019.01.08
블로그 이미지

엘로드넷

,