AnySim 설치
인스톨러 실행
AnySim을 설치하기 위해서 콘솔 인스톨러를 실행합니다.
|
다음은 AnySim을 설치하는 과정에 대한 설명입니다.
-
AnySim 인스톨러(anysim_2.0_generic.bin)를 설치 환경에 업로드하고 파일이 위치한 디렉터리로 이동합니다.
-
설치 파일이 실행 가능하도록 파일의 실행 권한을 다음과 같이 부여합니다.
chmod +x anysim_2.0_generic.bin
-
콘솔에서 설치 파일 이름을 입력한 후 <Enter> 키를 누릅니다.
anysim_2.0_generic.bin
-
라이선스 준수 화면이 표시됩니다. 자세한 정보를 확인하기 위해 <Enter> 키를 누릅니다.
=============================================================================== License Agreement ----------------- Installation and Use of AnySim Requires Acceptance of the Following License Agreement: Installation and Use of AnySim(hereafter, Software) Requires Acceptance of the Following License Agreement: TmaxSoft Co., Ltd. (hereafter, TmaxSoft) License Agreement (hereafter,Agreement) Product : AnySim This is a legal agreement between you (either an individual or an entity) and TmaxSoft, Incorporated. By opening the sealed software package and/or by using the software, you agree to be bound by the terms of this agreement. AnySim Software License 1. Grant of license: TmaxSoft hereby grants you a non-exclusive, non-transferable, non-sublicensable limited license to the Software and any intellectual property related to the Software including, but not limited to, user manuals and implementation instructions. You should read this Agreement carefully before opening the Software package, installing or using the Software. Once you open the Software package, install or use the Software, you are deemed to have agreed to the contents of this Agreement. 2. Copyright: The Software and all related intellectual property is owned by TmaxSoft and protected by copyright laws and international treaty provisions. You shall not use or copy the Software without usage authorization of TmaxSoft. You also shall not copy the printed materials accompanying the Software, nor print copies of any user documentation provided in online or electronic form. 3. Other restrictions: You shall not rent, lease, or lend the Software and accompanying materials on a permanent basis to any individual or company. You shall not, nor permit any third party to reverse engineer, decompile, disassemble, modify, adapt, create derivative works from or otherwise attempt to derive source code from the Software provided. TmaxSoft Co., Ltd.
-
라이선스 준수에 대한 정보를 모두 확인한 후 라이선스 동의를 위해 Y를 입력한 후 <Enter> 키를 누릅니다. 만약 동의하지 않으면 더 이상 설치 진행이 불가능합니다.
DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): Y -> License accepted. Proceeding...
-
설치 디렉터리 경로를 입력합니다. (기본값: /home/tmaxsoft/AnySim)
Enter installation path (default: /home/anysim/AnySim): -> Installing into: /home/anysim/AnySim
-
JDK의 위치를 입력합니다. (기본값: 자동으로 인식한 JDK의 위치)
This program requires Java version 17.0 or higher. Enter Java home path (default: /home/tmaxsoft/jdk/jdk-17.0.13+11): -> Java version 17.0 2024-10-15 detected at /home/tmaxsoft/jdk/jdk-17.0.13+11 (OK).
-
서비스 포트를 입력합니다. (기본값: 8080)
Enter web service port (default: 8080): -> Using port: 8080
-
데이터베이스가 설치되는 IP 주소를 입력합니다. (기본값: 127.0.0.1)
DB host/ip (default 127.0.0.1):
-
데이터베이스 포트를 입력합니다. (기본값: 1521)
DB port (default 1521):
-
데이터베이스 연결 타입을 입력합니다. (기본값: Service Name)
Choose connection type: 1) Service Name (e.g., ORCLPDB1) [default] 2) SID (e.g., ORCL) Selection [1/2]: 1 DB service name (e.g., ORCLPDB1): ORCLPDB1
-
데이터베이스 사용자의 ID를 입력합니다.
DB user: anysim
-
데이터베이스 사용자의 비밀번호를 입력합니다.
DB password: anysim
-
데이터베이스 스크립트의 실행 여부를 선택합니다. 처음 설치하는 경우 '실행(Y)'을 권장합니다.
Do you want to execute DB schema now? [Y/N]: → Using driver: /home/tmaxsoft/AnySim/lib/ojdbc11.jar → Connecting via: jdbc:oracle:thin:@//127.0.0.1:1521/ORCLPDB1 (Service) DB schema executed successfully. -> Oracle schema applied.
-
설치가 완료되면 요약 정보가 표시됩니다.
=============================================================================== Installation Summary ------------------------ Product Name: AnySim 2.0 Install Folder: /home/tmaxsoft/AnySim Settings: - JAVA_HOME: /home/tmaxsoft/jdk/jdk-17.0.13+11 - APP_PORT : 8080 - DB_HOST : 127.0.0.1 - DB_PORT : 1521 - DB_SID : ORCLPDB1 - DB_USER : anysim - DB_PASS : anysim To start the AnySim: /home/tmaxsoft/AnySim/bin/anysim_start.sh To stop the AnySim: /home/tmaxsoft/AnySim/bin/anysim_stop.sh After start, access the AnySim http://{server ip}:8080/
환경 설정
profile 파일 설정
profile 파일 설정을 통해 계정, DB, 서비스 포트 설정 등의 환경 변수를 정의할 수 있습니다.
export SERVICE_PORT=8080
export SPRING_DATASOURCE_DRIVER_CLASS_NAME="oracle.jdbc.driver.OracleDriver"
export SPRING_DATASOURCE_NAME=jdbc:oracle:thin:@127.0.0.1:1521/ORCLPDB1
export SPRING_DATASOURCE_USERNAME=anysim
export SPRING_DATASOURCE_PASSWORD=anysim
export JWT_SECRET=QW55U2ltdWxhdG9yIEFjY2VzcyBUb2tlbiBTZWNyZXQgS2V5Cg==
export JWT_ACCESS_TOKEN_EXPIRATION_MSEC="3600000" # 1 hour in milliseconds
export JWT_REFRESH_TOKEN_EXPIRATION_MSEC="36000000" # 10 hours in milliseconds
export DEFAULT_ADMIN_USER_SURNAME="admin"
export DEFAULT_ADMIN_USER_NAME="admin"
export DEFAULT_ADMIN_LOGIN_ID="admin"
export DEFAULT_ADMIN_PASSWORD="Admin@@123"
export DEFAULT_ADMIN_EMAIL="anysim@tmaxsoft.com"
다음은 설정 항목에 대한 설명입니다.
| 설정 항목 | 설명 |
|---|---|
SERVICE_PORT |
애플리케이션이 실행될 서버 포트 번호입니다. |
SPRING_DATASOURCE_DRIVER_CLASS_NAME |
데이터베이스 연결에 사용할 JDBC 드라이버 클래스 이름입니다. |
SPRING_DATASOURCE_NAME |
데이터베이스 접속 URL입니다. |
SPRING_DATASOURCE_USERNAME |
데이터베이스 사용자의 이름입니다. |
SPRING_DATASOURCE_PASSWORD |
데이터베이스 사용자의 비밀번호입니다. |
JWT_SECRET |
JWT 토큰 생성 및 검증에 사용되는 비밀 키입니다. |
JWT_ACCESS_TOKEN_EXPIRATION_MSEC |
Access Token 유효 시간입니다. (단위: 밀리초) |
JWT_REFRESH_TOKEN_EXPIRATION_MSEC |
Refresh Token 유효 시간입니다. (단위: 밀리초) |
DEFAULT_ADMIN_USER_SURNAME |
기본 관리자 계정의 성입니다. |
DEFAULT_ADMIN_USER_NAME |
기본 관리자 계정의 이름입니다. |
DEFAULT_ADMIN_LOGIN_ID |
기본 관리자 계정의 로그인 ID입니다. |
DEFAULT_ADMIN_PASSWORD |
기본 관리자 계정의 비밀번호입니다. |
DEFAULT_ADMIN_EMAIL |
기본 관리자 계정의 이메일 주소입니다. |
application.yml 파일 설정
application.yml 파일 설정을 통해 엔진 설정을 정의할 수 있습니다.
server:
port: ${SERVICE_PORT}
spring:
main:
banner-mode: LOG
datasource:
driver-class-name: ${SPRING_DATASOURCE_DRIVER_CLASS_NAME:oracle.jdbc.driver.OracleDriver}
url: ${SPRING_DATASOURCE_NAME}
username: ${SPRING_DATASOURCE_USERNAME}
password: ${SPRING_DATASOURCE_PASSWORD}
jwt:
secret: ${JWT_SECRET}
access_token_expiration_msec: ${JWT_ACCESS_TOKEN_EXPIRATION_MSEC:3600000}
refresh_token_expiration_msec: ${JWT_REFRESH_TOKEN_EXPIRATION_MSEC:36000000}
default:
admin:
surname: ${DEFAULT_ADMIN_USER_SURNAME:admin}
name: ${DEFAULT_ADMIN_USER_NAME:admin}
login_id: ${DEFAULT_ADMIN_LOGIN_ID:admin}
password: ${DEFAULT_ADMIN_PASSWORD}
email: ${DEFAULT_ADMIN_EMAIL}
다음은 설정 항목에 대한 설명입니다. (* 표시는 profile에 설정된 환경 변수 값을 사용)
| 설정 항목 | 설명 |
|---|---|
server.port * |
애플리케이션이 실행될 서버 포트 번호입니다. |
spring.main.banner-mode |
Spring Boot 시작 시 배너 출력 모드입니다. 'LOG’로 설정하면 콘솔이 아닌 로그 파일에 배너가 출력됩니다. |
spring.datasource.driver-class-name * |
데이터베이스 연결에 사용할 JDBC 드라이버 클래스 이름입니다. |
spring.datasource.url * |
데이터베이스 접속 URL입니다. |
spring.datasource.username * |
데이터베이스 사용자의 이름입니다. |
spring.datasource.password * |
데이터베이스 사용자의 비밀번호입니다. |
jwt.secret * |
JWT 토큰 생성 및 검증에 사용되는 비밀 키입니다. |
jwt.access_token_expiration_msec * |
Access Token 유효 시간입니다. (단위: 밀리초) |
jwt.refresh_token_expiration_msec * |
Refresh Token 유효 시간입니다. (단위: 밀리초) |
default.admin.surname * |
기본 관리자 계정의 성입니다. |
default.admin.name * |
기본 관리자 계정의 이름입니다. |
default.admin.login_id * |
기본 관리자 계정의 로그인 ID입니다. |
default.admin.password * |
기본 관리자 계정의 비밀번호입니다. |
default.admin.email * |
기본 관리자 계정의 이메일 주소입니다. |
logback-spring.xml 파일 설정
logback-spring.xml 파일 설정을 통해 엔진 로그 설정을 정의할 수 있습니다.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern> (1)
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> (2)
<file>${log.dir:-logs}/anysimulator.log</file> (3)
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> (4)
<fileNamePattern>${log.dir:-logs}/anysimulator-%d{yyyy-MM-dd}.log</fileNamePattern> (5)
<maxHistory>30</maxHistory> (6)
</rollingPolicy>
<encoder>
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
</encoder>
</appender>
<root level="INFO"> (7)
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
</configuration>
다음은 설정 항목에 대한 설명입니다.
| 설정 항목 | 설명 |
|---|---|
(1) |
로그 포맷 설정입니다.
|
(2) |
파일로 로그를 기록하는 롤링 설정입니다. |
(3) |
기본 로그 파일 경로 및 로그 파일 설정입니다. |
(4) |
시간 단위로 로그 파일을 롤링하는 정책입니다. |
(5) |
날짜별 로그 설정입니다. |
(6) |
로그 최대 보관 일수 설정입니다. |
(7) |
로그 레벨 설정입니다. (기본값: INFO)
|
데이터베이스 설정
AnySIM에서 사용될 테이블을 생성하는 SQL문을 실행합니다.
$ oracle_schema.sql
|
데이터베이스의 ID, 비밀번호는 profile 파일에 작성되어 있는 값과 일치해야 합니다. |
설치 확인
디렉터리 구조
AnySim 설치 후 디렉터리 구조는 다음과 같습니다.
|-- lib
|-- ojdbc11.jar
|-- AnySim_<버전>.jar
+-- web
|-- bin
|-- anysim_start.sh
|-- anysim_stop.sh
|-- config
|-- application.yml
|-- logback-spring.xml
|-- profile
|-- db_script
|-- oracle_schema.sql
- ojdbc11.jar
-
데이터베이스에서 사용할 JDBC 드라이버 파일입니다.
- AnySim_<버전>.jar
-
AnySim 런타입 바이너리 파일입니다.
- web
-
프론트 서비스를 위한 파일이 저장된 폴더입니다.
- anysim_start.sh
-
AnySim 엔진 기동을 위한 파일입니다.
- anysim_stop.sh
-
AnySim 엔진 종료를 위한 파일입니다.
- application.yml
-
엔진 기동을 위한 설정 파일입니다.
- logback-spring.xml
-
엔진 로그 설정을 위한 파일입니다.
- profile
-
엔진 기동에 필요한 설정 파일입니다.
- oracle_schema.sql
-
AnySim에서 사용될 테이블을 생성하는 SQL 파일입니다.