환경 

Openjdk 11

Tomcat 10.1.7 

Oracle Linux 8.7 

public Subnet 안에 구성 

 

SSH - mobaXterm 

 

 

1/ open jdk 11 다운로드 

https://jdk.java.net/java-se-ri/11

 

Java Platform, Standard Edition 11 Reference Implementations

Java Platform, Standard Edition 11 Reference Implementations The official Reference Implementation for Java SE 11 (JSR 384) is based solely upon open-source code available from the JDK 11 Project in the OpenJDK Community. This Reference Implementation a

jdk.java.net

 

2. tomcat 10.1.7 다운로드 

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

 

 

3. OCI 인스턴스 설치 및 기동

ssh key 파일 생성 후 설치해야하는 순서임. 이 테스트에서는 미리 생성된 키파일을 사용하였습니다.

 

 

4. PATH  :   jdk -> /app/jdk  tomcat -> app/was/tomcat

 

superuser로 생성 후 소유 권한 변경

chown -R opc:opc /app

 

 

5. 다운로드받은 jdk, tomcat 파일을 opc home 경로에 넣고

    각각 /app/jdk, /app/was/tomcat 위치에 mv로 옮겨준다.

 

 

 

6. jdk 압푹 풀기 

 

gzip -d openjdk-11+28_linux-x64_bin.tar.gz

tar -xvf openjdk-11+28_linux-x64_bin.tar

 

7. java 환경설정 

 

# sudo vi /etc/profile



export JAVA_HOME=/app/jdk/jdk-11

export PATH=$JAVA_HOME/bin:$PATH

export CLASSPATH=.$JAVA_HOME/lib/tools.jar

 

경로 설정 후 확인 

# java -version

 

 

8. tomcat 압축풀기 

 

gzip -d apache-tomcat-10.1.7.tar.gz

tar -xvf apache-tomcat-10.1.7.tar

 

실행 

tomcat_home/bin -> ./startup.sh run

 

# ps -ef | grep tomcat 으로 tomcat 기동 프로세스 확인 

 

 

9. OS 방화벽 열어주기 

 

sudo firewall-cmd --list-all # 포트 확인 

sudo firewall-cmd --add-port=8080/tcp --permanent 

sudo firewall-cmd --reload

sudo firewall-cmd --list-all

 

10. OCI 인스턴스 VCN 방화벽 체크하기.

public subnet (Internet Gateway필수)

Ingress Rule 내에 8080 포트를 열어준다

 

11. 8080포트로 잘 띄워졌는지 tomcat 기동확인 

 

 

계속 까먹네;