[apache tomcat 다운로드]

https://tomcat.apache.org/download-10.cgi

 

Apache Tomcat® - Apache Tomcat 10 Software Downloads

Welcome to the Apache Tomcat® 10.x software download page. This page provides download links for obtaining the latest version of Tomcat 10.1.x software, as well as links to the archives of older releases. Unsure which version you need? Specification versi

tomcat.apache.org

[jdk 다운로드]

https://teemstone.sharepoint.com/:x:/r/sites/teemstone/_layouts/15/Doc.aspx?sourcedoc=%7B2D507F64-A0E1-4CE3-9EA8-47114C88574E%7D&file=%EC%B5%9C%EC%9E%AC%EC%9A%B0.xlsx&action=default&mobileredirect=true

 

[Tomcat 설치]

1. 설치 디렉토리 생성

mkdir -p /app/was (Tomcat 엔진 경로 - 자유롭게 경로 생성 후 설치)


2. 설치 파일 업로드
다운로드 받은 apache tomcat 설치파일 (tar.gz)을 대상 서버에 업로드

 

3. 파일 압축 해제
설치 디렉토리로 mv 한 후에 gzip -dc "tomcat.tar.gz" | tar xvf - 

4. 톰캣 기동
기동 스크립트로 이동 cd /app/was/bin/start.up 후, ./startup.sh 실행

5. 외부 웹에서 접속 테스트 
아마 접속이 안될 것임...ㅎㅎ
   1. java 설치하라고 나옴

# ./startup.sh
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program


2. 기본포트는 8080 이기에 해당 포트를 방화벽에 열어주거나, 방화벽을 inactive 시켜야함

 

[Tomcat port 확인]

/conf/server.xml
- 설정된 포트로 웹 접속이 가능하다.

- 포트 변경을 하고 싶으면 Connector port=' ' 변경 후, 톰캣을 재시동 해준다.

    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         HTTP Connector: /docs/config/http.html
         AJP  Connector: /docs/config/ajp.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               maxParameterCount="1000"
               />

 

 

[방화벽 확인 및 오픈]

-방화벽 리스트 확인

# firewall-cmd --list-all 

public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens192
  sources:
  services: cockpit dhcpv6-client ssh
  ports: 9090/tcp
  protocols:
  forward: no
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

 

-방화벽 오픈(8080 TCP 영구적용)

# firewall-cmd --add-port=8080/tcp --permanent
success

 

-방화벽 적용
# firewall-cmd --reload
success

-방화벽 리스트 확인

# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens192
  sources:
  services: cockpit dhcpv6-client ssh
  ports: 9090/tcp 8080/tcp
  protocols:
  forward: no
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

 

 

계속 까먹네;