본문 바로가기
개발 공부 Today I Learned

[국비 78일차 TIL] geoserver, docker 설치

by 개발자신입 2024. 3. 15.
반응형



설치된 자바 버전 확인 

update-alternatives --list java

 

-> 데이터는 여기에서 다운 받아서 사용하기로. 

## ppt


범례 두가지로 볼 수 있게 

시/도를 선택하면 시군구별로 데이터를 볼 수 있도록하는 통계 페이지



gis기능을 사용하기에는 postgre가 제일 최적임.  (약 600여개 지원하는 기능이 있음 가장 풍부한 기능 제공)



자바 설치 우분투 wget 

 

 

 

green@DESKTOP-0L11UB0:~$ sudo netstat -tuln | grep 8080
green@DESKTOP-0L11UB0:~$ sudo netstat -tuln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN
tcp6       0      0 :::3306                 :::*                    LISTEN
udp        0      0 127.0.0.1:323           0.0.0.0:*
udp        0      0 127.0.0.53:53           0.0.0.0:*
udp6       0      0 ::1:323                 :::*
green@DESKTOP-0L11UB0:~$ ps aux | grep tomcat
green        962  0.0  0.0   4028  1996 pts/0    R+   11:16   0:00 grep --color=auto tomcat
green@DESKTOP-0L11UB0:~$ cd /mnt/c/apache-tomcat-9.0.84
green@DESKTOP-0L11UB0:/mnt/c/apache-tomcat-9.0.84$ ls
BUILDING.txt     LICENSE  README.md      RUNNING.txt  conf  logs  webapps
CONTRIBUTING.md  NOTICE   RELEASE-NOTES  bin          lib   temp  work
green@DESKTOP-0L11UB0:/mnt/c/apache-tomcat-9.0.84$ bin
Command 'bin' not found, did you mean:
  command 'bun' from snap bun-js (1.0.29)
  command 'din' from deb din (51.1.1-2build1)
  command 'bing' from deb bing (1.3.5-4)
  command 'win' from deb wily (0.13.41-10)
  command 'dbin' from deb dbmix (0.9.8-8)
  command 'ben' from deb ben (0.9.2ubuntu5)
  command 'tin' from deb tin (1:2.6.2~20220129-1)
  command 'bip' from deb bip (0.9.3-1)
See 'snap info <snapname>' for additional versions.
green@DESKTOP-0L11UB0:/mnt/c/apache-tomcat-9.0.84$ cd bin
green@DESKTOP-0L11UB0:/mnt/c/apache-tomcat-9.0.84/bin$ ./startup.sh
Using CATALINA_BASE:   /mnt/c/apache-tomcat-9.0.84
Using CATALINA_HOME:   /mnt/c/apache-tomcat-9.0.84
Using CATALINA_TMPDIR: /mnt/c/apache-tomcat-9.0.84/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /mnt/c/apache-tomcat-9.0.84/bin/bootstrap.jar:/mnt/c/apache-tomcat-9.0.84/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.

 

 

docker

 

1.  docker run --name geoserver -p 8000:8080 tomcat:9.0 (창을 끄지 말고 계속 실행시켜야함)
2. geoserver.war파일을 c:\temp 폴더에 복사 -> 파일명을 ROOT.war로 변경
3. 다른 cmd나 파워쉘 켜서 docker cp c:\temp\ROOT.war geoserver:/usr/local/tomcat/webapps
4. [Successfully copied 112MB to geoserver:/usr/local/tomcat/webapps] 설치 완료되면 localhost:8000 접속하면 geoserver가 뜸

 

** localhost:8000 실행하려면 docker에서 geoserver를 돌려줘야 함.

 

 

 

 

geoserver를 docker없이 사용하는 방법

1. 이클립스에서 geoserver.war를 import
2. 톰캣 포트를 80으로 변경
3. 톰캣 실행 시 geoserver와 프로젝트를 동시에 넣고 실행시키면 됨.

반응형

댓글