티스토리 뷰
Tomcat 설치후 실행을 했더니 다음과 같은 에러가 발생!!!
java.net.MalformedURLException: Local host name unknown:
내가 뭘 잘못했니 왜 나만안되니...ㅠㅠ
울면서 검색해본결과
/etc/hosts 파일에 hostname이 localhost로 설정되지 않아서 그렇다고함.
확인을 위해서 cat /etc/hosts 명령어를 실행
그런데 왜죠... 넘나 이쁘게 localhost가 잘 써있는데... 나는 왜 안되는거죠??
MacBook-Pro:~ USERNAME$ 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
::1 localhost
다시 구글링을 막 해서 찾은 해결 방법
현재 hostname을 localhost 옆에 추가해야함
참고: http://stackoverflow.com/a/20983480
MacBook-Pro:~ USERNAME$ hostname
MacBook-Pro.local
MacBook-Pro:~ USERNAME$ sudo vi /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 MacBook-Pro.local
::1 localhost MacBook-Pro.local
'Programming' 카테고리의 다른 글
[퍼온글] Mac에 Postgresql & Homebrew & lunchy 설치 (0) | 2017.03.29 |
---|---|
탐색 알고리즘(순차, 이진, 이진 탐색 트리, 해시 탐색) (0) | 2017.03.09 |
Java 십진수 변환 (2진수, 8진수, 16진수) (0) | 2017.03.08 |
거품 정렬 (Bubble Sort) /삽입 정렬 (Insertion Sort) / 선택 정렬 (Selection Sort) (0) | 2017.03.08 |
분할정복 알고리즘 - 퀵 정렬 (Quick Sort) (0) | 2017.03.07 |