728x90
300x250
[JSP] 4. 우분투 18.04(이하 "리눅스 환경")에서 개발하기?, WAR 배포하기 및 적용
([JSP] 4. Developing on Ubuntu 18.04 ("Linux Environment") ?, Deploying and Applying a WAR)


[개발(Development)]

개인적인 의견이지만, 윈도우 환경에서 개발 하는 것이 정신 건강에 이롭다.
(In my opinion, developing in a Windows environment is beneficial for mental health.)

개발 자체가 전혀 불가능한 건 아니지만 조금 그렇다.
(Development itself is not impossible at all, but a little.)



1. Eclipse WAS 배포파일 만들기(Create Eclipse WAS Distribution File)


* 1단계: File->Export를 클릭한다.
* 2단계: Web을 클릭한 후, WAR File을 클릭한다.

* 3단계: WebProject 위치와 Destination을 지정한 후 Finish를 누른다.
(Step 1: Click File-> Export.)
(Step 2: Click Web, then click WAR File.)
(Step 3: After specifying the WebProject location and destination, click Finish.)



그림 1) Export를 클릭한 후 War 파일을 클릭한 모습
Figure 1) Click on War file after clicking Export



그림 2) Export 화면
Figure 2) Export Screen


2. 웹 서버에 적용하기(Apply to web server)


사용한 명령어의 예는 다음과 같다.
(An example of the command used is as follows.)

$ mv helloWorld.war /var/lib/tomcat9/webapps
$ service tomcat9 restart




그림 3) 명령어 사용하는 모습의 예 - 도도(Dodo)
Figure 3) Example of Command Usage - Dodo

아래는 실제 WAR가 서버에 적용된 것이다. 참고하면 도움이 될 것이다.
(Below is the actual WAR applied to the server. Reference will help.)


그림 4) 웹 사이트에서 war 파일을 읽어온 모습
Figure 4) War file read from web site


3. 호기심이 생길 수 있는 질문 유형


Q1) Eclipse에서 배포 등에 사용되는 Server를 정의할 수 있는가?
      (Can I define a server used for deployment in Eclipse?)



그림 5) Servers의 "No servers are ..."을 클릭하기 전의 모습
Figure 5) Servers before clicking "No servers are ..."



그림 6) 아파치 톰캣이 존재하지 않는 모습
Figure 6) Apache Tomcat does not exist

반응형

+ Recent posts