window 서버배포
tomcat/webapps 내부에 war 파일을 넣는다
tomcat/bin/startup.bat 을 실행시키면 webapps 내부에 war파일이 자동으로 압축이풀리며 서버가 실행되는데
기본주소인 localhost:8080을 열면 기본 톰캣화면이 구동된다
톰캣은 webapps 내부에 ROOT 폴더를 기본 ROOT으로 잡고있기 때문이다
1. 그렇기 때문에 기존의 ROOT 폴더를 날리고 압축이 해제된 war폴더 명을 'ROOT' 라는 폴더명으로 바꿔주거나
or
2. 압축이 풀린 war폴더 명을 톰캣이 기본 ROOT로 인식하도록 tomcat/conf/server.xml 에서 <Context>를 추가해주면된다
<!--기본port는 8080으로 잡혀있다 원하는 port로 변경가능-->
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<!-- <Host>태그 안에 <Context>를 추가한다 (path 에 경로, docBase에 war 명-->
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="/" docBase="war명" reloadable="false" > </Context>
</Host>
둘중 하나의 세팅을 마치고
기본주소인 localhost:8080을 열면 project 화면이 열린다
리눅스 서버배포
먼저 톰캣을 다운받고
$ wget https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.81/bin/apache-tomcat-8.5.81.tar.gz
(주소는 톰캣 다운로드 에서 직접받지않고, 링크로 복사해서 붙여주면된다)
압축풀고 $ tar -zxvf apache-tomcat-8.5.81.tar.gz
세팅과 경로설정은 윈도우와 동일
war파일을 윈도우에서 리눅스로 넘겨주기위해 ftp를 사용했다
https://filezilla-project.org/download.php?type=client#close
Download FileZilla Client for Windows (64bit x86)
Download FileZilla Client for Windows (64bit x86) The latest stable version of FileZilla Client is 3.60.1 Please select the file appropriate for your platform below. Please select your edition of FileZilla Client FileZilla FileZilla with manual FileZilla P
filezilla-project.org
'OS (Operating System) > Window' 카테고리의 다른 글
윈도우(Window) 톰캣 오픈 SSL 적용하기 , tomcat open SSL (0) | 2022.07.05 |
---|---|
윈도우(window) 웹에서 local 파일 실행, 크롬에서 exe 파일 실행 , scheme does not have a registered handler, Deep link to a native app from a browser, with a fallback (0) | 2022.07.04 |
윈도우(Window) Jenkins 젠킨스 포트 변경 (0) | 2022.06.30 |
윈도우(window) NSIS 설치파일(exe) 만들기 (0) | 2022.06.24 |
윈도우 (window) 톰캣 서비스 등록 Apache Tomcat Window Service (0) | 2022.06.16 |