diff --git a/Recognition/.obsidian/appearance.json b/Recognition/.obsidian/appearance.json index 82d57aa..842ad85 100644 --- a/Recognition/.obsidian/appearance.json +++ b/Recognition/.obsidian/appearance.json @@ -1,8 +1,8 @@ { - "cssTheme": "Blue Topaz", + "cssTheme": "Prism", "theme": "obsidian", - "textFontFamily": "맑은 고딕", - "baseFontSize": 12, + "textFontFamily": "D2Coding,맑은 고딕,Consolas", + "baseFontSize": 15, "enabledCssSnippets": [], "accentColor": "", "translucency": false, diff --git a/Recognition/.obsidian/plugins/obsidian-style-settings/data.json b/Recognition/.obsidian/plugins/obsidian-style-settings/data.json index fe5640f..502f1a6 100644 --- a/Recognition/.obsidian/plugins/obsidian-style-settings/data.json +++ b/Recognition/.obsidian/plugins/obsidian-style-settings/data.json @@ -48,5 +48,16 @@ "minimal-style@@embed-strict": true, "blue-topaz-theme@@rainbow-checkbox": false, "blue-topaz-theme@@list-style-change-options": "list-no-border", - "Blue-Topaz-Codebox-Highlight@@code-theme-selection": "code-theme-sublime" + "Blue-Topaz-Codebox-Highlight@@code-theme-selection": "code-theme-sublime", + "obsidian-prism-theme@@pt-file-explorer-folder-icon": true, + "obsidian-prism-theme@@pt-icons-accent": true, + "obsidian-prism-theme@@pt-fade-inactive-tabs": false, + "obsidian-prism-theme@@pt-disable-blur": false, + "obsidian-prism-theme@@pt-disable-callout-styling": false, + "obsidian-prism-theme@@pt-custom-vault-banner": false, + "obsidian-prism-theme@@custom-vault-banner-horizontal-align": "pt-custom-vault-banner-justify-content-center", + "obsidian-prism-theme@@pt-custom-vault-banner-sticky": false, + "obsidian-prism-theme@@pt-focused-mode": true, + "obsidian-prism-theme@@pt-titlebar-hide-text": true, + "obsidian-prism-theme@@scroll-bar-size": 9 } \ No newline at end of file diff --git a/Recognition/.obsidian/plugins/recent-files-obsidian/data.json b/Recognition/.obsidian/plugins/recent-files-obsidian/data.json index 479123b..d93ed26 100644 --- a/Recognition/.obsidian/plugins/recent-files-obsidian/data.json +++ b/Recognition/.obsidian/plugins/recent-files-obsidian/data.json @@ -1,204 +1,204 @@ { "recentFiles": [ { - "basename": "CLI에서 Git 사용", - "path": "Tools/GitHub/CLI에서 Git 사용.md" + "basename": "Maven 설치", + "path": "Tools/VSCode_Server/Maven 설치.md" }, { - "basename": "Gitea 설치", - "path": "Tools/GitHub/Gitea 설치.md" + "basename": "프로젝트 생성", + "path": "Tools/VSCode_Server/프로젝트 생성.md" }, { - "basename": "TODO", - "path": "Work Related/프로젝트/스마트계류장/TODO.md" + "basename": "Ubuntu에 설치", + "path": "Tools/VSCode_Server/Ubuntu에 설치.md" }, { - "basename": "주기장 기준 항공기 유무 확인 쿼리(GAM)", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/주기장 기준 항공기 유무 확인 쿼리(GAM).md" + "basename": "vscode_server 설치관련", + "path": "Tools/VSCode_Server/vscode_server 설치관련.md" }, { - "basename": "Docker 명령어", - "path": "Programing/Docker/Docker 명령어.md" + "basename": "VSCode 설치", + "path": "Tools/VSCode/VSCode 설치.md" }, { - "basename": "Docker 폐쇄망 설치", - "path": "Programing/Docker/Docker 폐쇄망 설치.md" - }, - { - "basename": "CMD 명령어", - "path": "Programing/Windows/CMD 명령어.md" - }, - { - "basename": "Docker 페쇄망 이관", - "path": "Programing/Docker/Docker 페쇄망 이관.md" - }, - { - "basename": "Docker 설치", - "path": "Programing/Docker/Docker 설치.md" + "basename": "VSCode Extension", + "path": "Tools/VSCode/VSCode Extension.md" }, { "basename": "공유문서", "path": "Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md" }, { - "basename": "중단파서버 보안취약점", - "path": "Work Related/프로젝트/D-MHFH/유지보수/중단파서버 보안취약점.md" + "basename": "2024-03-25", + "path": "Work Related/1.업무메모/2024-03-25.md" + }, + { + "basename": "방문증 신청 문구", + "path": "Work Related/프로젝트/스마트계류장/9.기타/방문증 신청 문구.md" + }, + { + "basename": "Docker 폐쇄망 설치", + "path": "Programing/Docker/Docker 폐쇄망 설치.md" }, { "basename": "프로세스 확인 및 강제 종료", "path": "Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md" }, { - "basename": "RabbitMQ 설치", - "path": "Programing/RabbitMQ(AMQP)/RabbitMQ 설치.md" + "basename": "Reno server URL", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/Reno server URL.md" }, { - "basename": "Server에 VNC 설치", - "path": "Programing/Linux/Ubuntu/Server에 VNC 설치.md" - }, - { - "basename": "Ubuntu GitLab-CE 설치", - "path": "Programing/Linux/Ubuntu/Ubuntu GitLab-CE 설치.md" - }, - { - "basename": "테이블 Archive 로그 설정 변경", - "path": "Programing/Tibero/테이블 Archive 로그 설정 변경.md" - }, - { - "basename": "통계관련", - "path": "Work Related/프로젝트/스마트계류장/통계관련.md" - }, - { - "basename": "Kafka ELK로 모니터링", - "path": "Programing/Kafka(AMQP)/Kafka ELK로 모니터링.md" - }, - { - "basename": "Tibero 이중화 구성시 서비스 실행", - "path": "Programing/Tibero/Tibero 이중화 구성시 서비스 실행.md" - }, - { - "basename": "Tibero 7 설치", - "path": "Programing/Tibero/Tibero 7 설치.md" - }, - { - "basename": "Ubuntu Gitlab 설치", - "path": "Tools/GitHub/Ubuntu Gitlab 설치.md" - }, - { - "basename": "리눅스 명령어", - "path": "Programing/Linux/Linux 명령어/리눅스 명령어.md" - }, - { - "basename": "function Table", - "path": "Programing/Tibero/function Table.md" + "basename": "Docker 설치", + "path": "Programing/Docker/Docker 설치.md" }, { "basename": "Docker Compose", "path": "Programing/Docker/Docker Compose.md" }, { - "basename": "ASDE UDP", - "path": "Work Related/프로젝트/스마트계류장/외부연계 관련/Asterix분석/ASDE UDP.md" + "basename": "Docker 페쇄망 이관", + "path": "Programing/Docker/Docker 페쇄망 이관.md" }, { - "basename": "Ubuntu 버전 확인", - "path": "Programing/Linux/Ubuntu/Ubuntu 버전 확인.md" + "basename": "Docker Engine", + "path": "Programing/Docker/Docker Engine.md" }, { - "basename": "2023-04-06", - "path": "Work Related/1.업무메모/2023-04-06.md" + "basename": "2022-06-06", + "path": "Work Related/1.업무메모/2022.06/2022-06-06.md" }, { - "basename": "win탐색기에서 roo 폴더 열기", - "path": "Programing/Linux/WSL/win탐색기에서 roo 폴더 열기.md" + "basename": "2022-06-16", + "path": "Work Related/1.업무메모/2022.06/2022-06-16.md" }, { - "basename": "WSL2설치", - "path": "Programing/Linux/WSL/WSL2설치.md" + "basename": "상황관제-방송수신내역(항적)", + "path": "Work Related/프로젝트/D-MHFH/유지보수/상황관제-방송수신내역(항적).md" }, { - "basename": "ElasticSearch 검색 관련", - "path": "Programing/ELK/ElasticSearch 검색 관련.md" + "basename": "커맨트라인(bash) 단축키", + "path": "Programing/Linux/Linux 명령어/커맨트라인(bash) 단축키.md" }, { "basename": "ElasticSearch 쿼리", "path": "Programing/ELK/ElasticSearch 쿼리.md" }, { - "basename": "query DSL", - "path": "Programing/ELK/query DSL.md" + "basename": "Set Up", + "path": "Learning/Programing/WSL개발환경 셋팅/Set Up.md" }, { - "basename": "LAG, LEAD 함수 (위아래 행간 컬럼 비교)", - "path": "Programing/Oracle/LAG, LEAD 함수 (위아래 행간 컬럼 비교).md" + "basename": "Tibero 7 설치", + "path": "Programing/Tibero/Tibero 7 설치.md" }, { - "basename": "정렬된 자료에서 빈칸채우기", - "path": "Programing/MariaDB/정렬된 자료에서 빈칸채우기.md" + "basename": "리눅스 확장자 일괄 변경", + "path": "Programing/Linux/Linux 명령어/리눅스 확장자 일괄 변경.md" }, { - "basename": "용어정리", - "path": "Work Related/프로젝트/스마트계류장/항공용어/용어정리.md" + "basename": "리눅스 특정 폴더, 파일 용량 확인", + "path": "Programing/Linux/Linux 명령어/리눅스 특정 폴더, 파일 용량 확인.md" }, { - "basename": "엔티티설계서", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/산출물작업/엔티티설계서.md" + "basename": "무제 파일 2", + "path": "Programing/Docker/무제 파일 2.md" }, { - "basename": "2022-05-31", - "path": "Work Related/1.업무메모/2022.05/2022-05-31.md" + "basename": "HAProxy HA (High Availability) 구성하기", + "path": "Programing/Linux/RHEL9/HAProxy HA (High Availability) 구성하기.md" }, { - "basename": "한영 마우스 툴팁", - "path": "Tools/Autohotkey/한영 마우스 툴팁.md" + "basename": "NGINX HA (High Availability) 구성하기", + "path": "Programing/Linux/RHEL9/NGINX HA (High Availability) 구성하기.md" }, { - "basename": "통계화면 초안 차트", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/통계화면 초안 차트.md" + "basename": "리눅스 crontab", + "path": "Programing/Linux/Linux 프로그램/리눅스 crontab.md" }, { - "basename": "테이블 정의서 DB테이블 생성", - "path": "Programing/MariaDB/테이블 정의서 DB테이블 생성.md" + "basename": "Utils", + "path": "Programing/Linux/Linux 프로그램/Utils.md" + }, + { + "basename": "테이블 일괄 생성 스크립트", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/산출물작업/테이블 일괄 생성 스크립트.md" + }, + { + "basename": "테이블 Archive 로그 설정 변경", + "path": "Programing/Tibero/테이블 Archive 로그 설정 변경.md" + }, + { + "basename": "일반 유저에 관리자 권한 부여", + "path": "Programing/Linux/Ubuntu/일반 유저에 관리자 권한 부여.md" + }, + { + "basename": "무제 파일", + "path": "무제 파일.canvas" + }, + { + "basename": "자주사용하는 마크다운", + "path": "Programing/Markdown/자주사용하는 마크다운.md" + }, + { + "basename": "Filebeat 재배포", + "path": "Work Related/프로젝트/스마트계류장/9.기타/Filebeat 재배포.md" + }, + { + "basename": "2022-11-11", + "path": "Work Related/1.업무메모/2023/2022-11-11.md" + }, + { + "basename": "리눅스 데몬 서비스 관련", + "path": "Programing/Linux/Linux 명령어/리눅스 데몬 서비스 관련.md" + }, + { + "basename": "리눅스 명령어", + "path": "Programing/Linux/Linux 명령어/리눅스 명령어.md" + }, + { + "basename": "ELK 폐쇄망 설치(New)", + "path": "Programing/ELK/ELK 폐쇄망 설치(New).md" + }, + { + "basename": "리눅스 ls 정렬해서 보기", + "path": "Programing/Linux/Linux 명령어/리눅스 ls 정렬해서 보기.md" + }, + { + "basename": "무제 파일 1", + "path": "Programing/Docker/무제 파일 1.md" + }, + { + "basename": "유닉스(AIX) 유저 생성", + "path": "Programing/Linux/Unix/유닉스(AIX) 유저 생성.md" + }, + { + "basename": "ssh포트로 파일 전송", + "path": "Programing/Linux/Linux 명령어/ssh포트로 파일 전송.md" + }, + { + "basename": "Ubuntu 버전 확인", + "path": "Programing/Linux/Ubuntu/Ubuntu 버전 확인.md" + }, + { + "basename": "리눅스 OS 버전확인", + "path": "Programing/Linux/Linux 명령어/리눅스 OS 버전확인.md" }, { "basename": "Kafka 설치", "path": "Programing/Kafka(AMQP)/Kafka 설치.md" }, { - "basename": "DB 컬럼 이름 변경", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/DB 컬럼 이름 변경.md" + "basename": "특정 포트 임시 오픈", + "path": "Programing/Linux/Ubuntu/특정 포트 임시 오픈.md" }, { - "basename": "Kafka JMX 설정", - "path": "Programing/Kafka(AMQP)/Kafka JMX 설정.md" + "basename": "특정포트 허용", + "path": "Programing/Linux/RHEL9/특정포트 허용.md" }, { - "basename": "무제 파일", - "path": "Programing/Kafka(AMQP)/무제 파일.md" - }, - { - "basename": "Kafka로 Logback 보내기", - "path": "Programing/Kafka(AMQP)/Kafka로 Logback 보내기.md" - }, - { - "basename": "VScode UI 명칭", - "path": "Tools/VSCode/VScode UI 명칭.md" - }, - { - "basename": "Termux Linux 설치", - "path": "Programing/Linux/Termux/Termux Linux 설치.md" - }, - { - "basename": "start", - "path": "Programing/Linux/LFS(Linux From Scratch)/start.md" - }, - { - "basename": "CentOS에 JAVA 설치", - "path": "Programing/Linux/CentOS/CentOS에 JAVA 설치.md" - }, - { - "basename": "CentOS Java 설치", - "path": "Programing/Linux/CentOS/CentOS Java 설치.md" + "basename": "2023-05-08", + "path": "Work Related/1.업무메모/2023/2023-05-08.md" } ], "omittedPaths": [], diff --git a/Recognition/.obsidian/workspace.json b/Recognition/.obsidian/workspace.json index 82a5e5d..a4030cd 100644 --- a/Recognition/.obsidian/workspace.json +++ b/Recognition/.obsidian/workspace.json @@ -4,16 +4,16 @@ "type": "split", "children": [ { - "id": "615ebe2faa749939", + "id": "665ce87635c13187", "type": "tabs", "children": [ { - "id": "1b9c58f1fa7c8461", + "id": "1b13dc8db74ebc6c", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "Work Related/프로젝트/D-MHFH/유지보수/중단파서버 보안취약점.md", + "file": "Work Related/1.업무메모/2024-03-25.md", "mode": "source", "backlinks": true, "source": false @@ -21,12 +21,12 @@ } }, { - "id": "8f63a3303041aef4", + "id": "bd4fead765e9c739", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "Programing/Windows/CMD 명령어.md", + "file": "Programing/Docker/Docker 페쇄망 이관.md", "mode": "source", "backlinks": true, "source": false @@ -34,12 +34,12 @@ } }, { - "id": "8d740b927ee10e19", + "id": "6b3bea491a79b018", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "Work Related/프로젝트/스마트계류장/TODO.md", + "file": "Tools/VSCode_Server/Maven 설치.md", "mode": "source", "backlinks": true, "source": false @@ -76,7 +76,7 @@ "state": { "type": "search", "state": { - "query": "netstat", + "query": "프로세스", "matchingCase": false, "explainSearch": false, "collapseAll": true, @@ -113,7 +113,7 @@ } ], "direction": "horizontal", - "width": 286.5 + "width": 296.5 }, "right": { "id": "4797c4301ffee1db", @@ -129,7 +129,7 @@ "state": { "type": "backlink", "state": { - "file": "Work Related/프로젝트/스마트계류장/TODO.md", + "file": "Tools/VSCode_Server/Maven 설치.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -146,7 +146,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "Work Related/프로젝트/스마트계류장/TODO.md", + "file": "Tools/VSCode_Server/Maven 설치.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -169,7 +169,7 @@ "state": { "type": "outline", "state": { - "file": "Work Related/프로젝트/스마트계류장/TODO.md" + "file": "Tools/VSCode_Server/Maven 설치.md" } } }, @@ -194,7 +194,7 @@ } } ], - "currentTab": 2 + "currentTab": 3 } ], "direction": "horizontal", @@ -211,36 +211,39 @@ "command-palette:명령어 팔레트 열기": false } }, - "active": "8d740b927ee10e19", + "active": "6b3bea491a79b018", "lastOpenFiles": [ - "Work Related/프로젝트/스마트계류장/1.데이터베이스/주기장 기준 항공기 유무 확인 쿼리(GAM).md", - "Work Related/프로젝트/스마트계류장/TODO.md", - "Programing/Docker/Docker 명령어.md", - "Programing/Docker/Docker 폐쇄망 설치.md", - "Programing/Windows/CMD 명령어.md", - "Programing/Docker/Docker 페쇄망 이관.md", - "Programing/Docker/Docker 설치.md", + "Tools/VSCode_Server/프로젝트 생성.md", + "Tools/VSCode_Server/Ubuntu에 설치.md", + "Tools/VSCode_Server/vscode_server 설치관련.md", + "Tools/VSCode_Server/Maven 설치.md", + "Tools/VSCode/VSCode 설치.md", + "Tools/VSCode/VSCode Extension.md", "Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md", - "Work Related/프로젝트/D-MHFH/유지보수/중단파서버 보안취약점.md", + "Work Related/1.업무메모/2024-03-25.md", + "Work Related/프로젝트/스마트계류장/9.기타/방문증 신청 문구.md", + "Programing/Docker/Docker 폐쇄망 설치.md", "Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md", - "Programing/RabbitMQ(AMQP)/RabbitMQ 설치.md", - "Programing/Linux/Ubuntu/Server에 VNC 설치.md", - "Programing/Linux/Ubuntu/Ubuntu GitLab-CE 설치.md", - "Programing/Tibero/테이블 Archive 로그 설정 변경.md", - "Work Related/프로젝트/스마트계류장/통계관련.md", - "Programing/Kafka(AMQP)/Kafka ELK로 모니터링.md", - "Programing/Tibero/Tibero 이중화 구성시 서비스 실행.md", - "Programing/Tibero/Tibero 7 설치.md", - "Tools/GitHub/Ubuntu Gitlab 설치.md", - "Programing/Linux/Linux 명령어/리눅스 명령어.md", - "Programing/Tibero/function Table.md", + "Work Related/프로젝트/스마트계류장/1.데이터베이스/Reno server URL.md", + "Programing/Docker/Docker 설치.md", "Programing/Docker/Docker Compose.md", - "Work Related/프로젝트/스마트계류장/외부연계 관련/Asterix분석/ASDE UDP.md", - "Programing/Linux/Ubuntu/Ubuntu 버전 확인.md", - "Work Related/1.업무메모/2023-04-06.md", + "Programing/Docker/Docker 페쇄망 이관.md", + "Programing/Docker/Docker Engine.md", + "Work Related/1.업무메모/2022.06/2022-06-06.md", + "Work Related/1.업무메모/2022.06/2022-06-16.md", + "Work Related/프로젝트/D-MHFH/유지보수/상황관제-방송수신내역(항적).md", + "Programing/Linux/Linux 명령어/커맨트라인(bash) 단축키.md", + "Programing/ELK/ElasticSearch 쿼리.md", + "Learning/Programing/WSL개발환경 셋팅/Set Up.md", + "Programing/Tibero/Tibero 7 설치.md", + "Programing/Linux/Linux 명령어/리눅스 확장자 일괄 변경.md", + "Programing/Linux/Linux 명령어/리눅스 특정 폴더, 파일 용량 확인.md", + "Programing/Docker/무제 파일 2.md", + "무제 파일.canvas", + "Work Related/1.업무메모/2023", + "zzz.resources/Pasted image 20240320095219.png", "zzz.resources/Pasted image 20240304095048.png", "zzz.resources/Pasted image 20240304095038.png", - "Programing/Linux/WSL/win탐색기에서 roo 폴더 열기.md", "zzz.resources/tibero-jdbc-7.jar", "Work Related/프로젝트/스마트계류장/Java PGM/Components/DB", "Work Related/프로젝트/스마트계류장/Java PGM/Components", @@ -252,14 +255,11 @@ "새 텍스트 문서.txt", "zzz.resources/Pasted image 20221228170541.png", "Programing/Linux/Unix", - "무제 파일.canvas", "Work Related/프로젝트/스마트계류장/Java PGM/Radar/desktop.ini", "Work Related/프로젝트/스마트계류장/Java PGM/desktop.ini", "Work Related/프로젝트/스마트계류장/Java PGM/Radar", - "Work Related/프로젝트/스마트계류장/외부연계 관련/desktop.ini", "zzz.resources/Pasted image 20230618182519.png", "zzz.resources/Pasted image 20230606235608.png", - "zzz.resources/Pasted image 20230525092338.png", "무제 파일 2.canvas", "무제 파일 1.canvas" ] diff --git a/Recognition/Programing/Docker/Docker Compose.md b/Recognition/Programing/Docker/Docker Compose.md index 37c771a..8e023e4 100644 --- a/Recognition/Programing/Docker/Docker Compose.md +++ b/Recognition/Programing/Docker/Docker Compose.md @@ -1,21 +1,49 @@ #docker - +- 명령어 ```bash +# -f : 파일경로 지정 +# -d : 데몬모드(up옵션) +# build +# down +# ps --- -docker-compose -f docker-compose-kafka.yml up -d +# 데몬 모드로 compose 실행 +docker-compose -f docker-compose.yml up -d -docker-compose -f docker-compose-kafka.yml down +# 해당 compose로 실행 중인 컨테이너 일괄 삭제 +docker-compose -f docker-compose.yml down -docker-compose -f docker-compose-kafka.yml ps +# 해당 compose로 실행중인 프로세스 확인 +docker-compose -f docker-compose.yml ps +# 빌드와 실행 같이 수행 docker-compose build && docker-compose up -d -docker exec -it kafka1 bash -kafka-topics --list --bootstrap-server kafka1:9091 +# compose 버전 확인 +docker-compose --version ``` -- 버전확인 -> docker-compose --version \ No newline at end of file + +- docker-compose.yml 파일 작성 +```yml +version: "3" + services: + {Service Name}: + container_name: my-jenkins + user: "${UID}:${GID}" # volume 폴더 젒근 권한 설정 + image: my-jenkins + build: . + volumes: + - $VOLUME_JENKINS_HOME:/var/jenkins_home # jenkins 설치 폴더 + - /var/run:/var/run:ro # docker 실행 폴더 공유 + environment: + - TZ=Asia/Seoul # jenkins 시간 + ports: + - "18080:8080" # jenkins 접속 port + - "50000:50000" # jenkins agent를 통해 통신 할때 + group_add: + - ${DOCKER_GROUP} # docker 실행을 위한 그룹 추가 + +``` diff --git a/Recognition/Programing/Docker/Docker 명령어.md b/Recognition/Programing/Docker/Docker 명령어.md index 9ba2389..950a387 100644 --- a/Recognition/Programing/Docker/Docker 명령어.md +++ b/Recognition/Programing/Docker/Docker 명령어.md @@ -39,7 +39,7 @@ > docker stop {container name} - 외부에서 컨테이너 내부 명령어 사용 -> docker exec -it {container name} {명령어} +> docker exec {--user root} -it {container name} {명령어} - 컨테이너 생성 > docker run {이미지명} {명령어} diff --git a/Recognition/Programing/Docker/Docker 폐쇄망 설치.md b/Recognition/Programing/Docker/Docker 폐쇄망 설치.md index 47c6621..f35265c 100644 --- a/Recognition/Programing/Docker/Docker 폐쇄망 설치.md +++ b/Recognition/Programing/Docker/Docker 폐쇄망 설치.md @@ -1,32 +1,36 @@ #### 폐쇄망에서 도커 설치(tgz) -- 설치 및 기동 -1. https://download.docker.com/linux/static/stable/x86_64/ 링크를 통해 원하는 도커 버전을 받는다. -2. 해당 폴더를 서버에 업로드 한다. -3. tar -xvf docker-20.10.21.tgz -4. mv * /usr/bin/ -5. dockerd & -> 데몬을 시작할 때 옵션을 추가하고 싶다면 /etc/docker/daemon.json 파일을 수정해주거나 없다면 생성. + +##### Docker 설치 +```shell +# 도커 다운로드 + https://download.docker.com/linux/static/stable/x86_64/ + +# 압축풀기 +tar -xvf docker-20.10.21.tgz + +# 소유자 변경 +chown -R root:root docker + +# bin폴더로 이동 +mv docker/* /usr/bin/ + +# 도커 데몬 실행 +dockerd & + +``` ##### Compose 설치 ```bash # docker-compose 파일 다운로드 # (https://github.com/docker/compose/releases) -cp docker-compose /usr/local/bin/docker-compose -chmod +x /usr/local/bin/docker-compose -ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose + +cp docker-compose /usr/local/bin/docker-compose && +chmod +x /usr/local/bin/docker-compose && +ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose && docker-compose --version ``` - -##### 도커 이미지 로드 -```bash - -docker load -i /home/gmt/SACP-INSTALL/Docker/docimg_cp-kafka.tar - -``` - - ##### 일반 유저 도커 사용 ```Shell @@ -39,7 +43,12 @@ usermod -aG docker user_id # 데몬 설치전 docker 컨테이너와 프로세스 모두 종료 # /var/lib/docker 폴더 삭제 +# 도커용 로그 폴더 생성 +# mkdir /home/gmt/{elk_data,Docker-data} + +# 데몬 서비스 작성 nano /etc/systemd/system/docker.service +######################################################### [Unit] Description=Systemd Docker Daemon @@ -50,16 +59,37 @@ Restart=on-failure [Install] WantedBy=multi-user.target +######################################################### -systemctl enable docker -systemctl start docker + +# 도커 서비스 실행전 도커 데몬 프로세스 종료 +ps -ef | grep docker +kill -9 [PID] + +# 서비스 실행 +systemctl daemon-reload && +systemctl enable docker && +systemctl start docker && systemctl status docker +``` + + +##### 도커 이미지 로드 +```bash + +docker load -i /home/gmt/SACP-INSTALL/docimgs/docimg_cp-kafka.tar + +# ELK 도커 이미지 로드 +docker load -i /home/gmt/SACP-INSTALL/docimgs/docimg_elasticserch.tar +docker load -i /home/gmt/SACP-INSTALL/docimgs/docimg_kibana.tar +docker load -i /home/gmt/SACP-INSTALL/docimgs/docimg_logstash.tar ``` + ``` ##### Compose 실행 diff --git a/Recognition/Programing/Docker/무제 파일 1.md b/Recognition/Programing/Docker/무제 파일 1.md new file mode 100644 index 0000000..e69de29 diff --git a/Recognition/Programing/Docker/무제 파일 2.md b/Recognition/Programing/Docker/무제 파일 2.md new file mode 100644 index 0000000..e69de29 diff --git a/Recognition/Programing/ELK/ELK 폐쇄망 설치(New).md b/Recognition/Programing/ELK/ELK 폐쇄망 설치(New).md index b8dfb17..3088e0d 100644 --- a/Recognition/Programing/ELK/ELK 폐쇄망 설치(New).md +++ b/Recognition/Programing/ELK/ELK 폐쇄망 설치(New).md @@ -1,67 +1,14 @@ +##### 도커 설치 +[[Docker 폐쇄망 설치]] + + ```shell -# 폴더 생성 및 설치 파일 이동 -## local : C:\kdggmtwork\스마트계류장\3.개발관련문서\배포및설치\ELK - -# 도커 설치 -cd /home/gmt/SACP-INSTALL/Docker/ -tar -xvf docker-20.10.21.tgz -chown -R root:root docker -cd docker/ -mv * /usr/bin/ - -# 도커 설치 확인 -docker --version - -# 도커 실행 -dockerd & - -# 도커 compose 설치 -cd /home/gmt/SACP-INSTALL/Docker/ -cp docker-compose /usr/local/bin/docker-compose -chmod +x /usr/local/bin/docker-compose -ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose - -# 도커 compose 설치 확인 -docker-compose --version - # ELK 도커 이미지 로드 docker load -i /home/gmt/SACP-INSTALL/docimgs/docimg_elasticserch.tar docker load -i /home/gmt/SACP-INSTALL/docimgs/docimg_kibana.tar docker load -i /home/gmt/SACP-INSTALL/docimgs/docimg_logstash.tar -# 도커용 로그 폴더 생성 -mkdir /home/gmt/elk_data -mkdir /home/gmt/Docker-Data - -# 도커 데몬 서비스 등록 -nano /etc/systemd/system/docker.service -##################################################### -[Unit] -Description=Systemd Docker Daemon - -[Service] -Type=simple -ExecStart=dockerd --data-root=/home/gmt/Docker_data -Restart=on-failure - -[Install] -WantedBy=multi-user.target -##################################################### - - - -# 도커 서비스 실행전 도커 데몬 프로세스 종료 -ps -ef | grep docker -kill -9 [PID] - -# 도커 서비스 실행 -systemctl daemon-reload -systemctl enable docker -systemctl status docker - - - # ELK 도커 설치 cd /home/gmt/SACP-INSTALL/elk/ docker-compose build && docker-compose up -d @@ -73,9 +20,6 @@ docker exec -it es01 bash docker exec -it --user root es01 bash - - - ``` @@ -83,23 +27,11 @@ docker exec -it --user root es01 bash ```shell # ELK 실행 오류시 -mkdir /home/gmt/elk_data/backup -nano /home/gmt/elk_data/es01/nodes/0/node.lock -chmod -R 755 /home/gmt/elk_data - -# JAVA 설치 확 -tar -xvf openjdk-18+36_linux-x64_bin.tar.gz -nano /etc/profile -##################################################### - -export JAVA_HOME=/home/gmt/SACP-INSTALL/java/jdk-18 -export PATH=$JAVA_HOME/bin:$PATH -export CLASS_PATH=$JAVA_HOME/lib:$CLASS_PATH - -##################################################### -source /etc/profile -echo $JAVA_HOME -java -version +... +root "cause: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/data/nodes/0/node.lock" +... +## elk data 폴더 uid를 container uid와 일치 시켜야 함. +chown -R 1000:0 /data/elk_data/ # 도커 서비스 실행 안되는 경우 diff --git a/Recognition/Programing/Kafka(AMQP)/Kafka ELK로 모니터링.md b/Recognition/Programing/Kafka(AMQP)/Kafka ELK로 모니터링.md index 3eba6c7..b053ab3 100644 --- a/Recognition/Programing/Kafka(AMQP)/Kafka ELK로 모니터링.md +++ b/Recognition/Programing/Kafka(AMQP)/Kafka ELK로 모니터링.md @@ -1,6 +1,9 @@ - metricbeat 사용 https://www.elastic.co/kr/blog/how-to-monitor-containerized-kafka-with-elastic-observability + + + ``` yml -- 다운로드 @@ -22,11 +25,35 @@ cd ${설치경로} -- 서비스 실행 ./metricbeat -e --strict.perms=false - - - -./filebeat setup -c filebeat.yml +./metricbeat -e -c metricbeat.yml ``` + +- jolokia 적용 +https://dev.to/martinhynar/monitoring-kafka-brokers-using-jolokia-metricbeat-and-elasticsearch-5678 +```shell +# 다운로드 +https://jolokia.org/download.html + +# docker-compose에 volumes추가 +volumes: + - ./jolokia-agent-jvm-2.0.2-javaagent.jar:/home/appuser/jolokia.jar + + +KAFKA_JMX_OPTS: "-javaagent:/home/appuser/jolokia.jar=port=8771,host=10.200.31.6 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" + + + +``` + + + +- ELK 연동 +https://github.com/freepsw/kafka-metrics-monitoring/tree/master/kafka_monitoring_package + + +- AKHQ +/home/gmt/SACP-INSTALL/akhq/jdk-18/bin/java -Dmicronaut.config.files=akhq_config_simple.yml -jar akhq.jar + diff --git a/Recognition/Programing/Linux/Linux 명령어/ssh포트로 파일 전송.md b/Recognition/Programing/Linux/Linux 명령어/ssh포트로 파일 전송.md index de81fc3..ba5aa59 100644 --- a/Recognition/Programing/Linux/Linux 명령어/ssh포트로 파일 전송.md +++ b/Recognition/Programing/Linux/Linux 명령어/ssh포트로 파일 전송.md @@ -3,6 +3,6 @@ scp -P 8022 "C:\kdggmtwork\업무유틸\티베로7_메뉴얼\install\tibero7.tar.gz" u0_a319@39.123.110.133:/$PREFIX/tmp # 로컬에서 원격서버로 복사 -scp -P 11443 /Tibero_Archive1/* root@10.200.31.56:/Tibero_arc_backup/1108 +scp -P 11443 /home/gmt/SACP-INSTALL.tar root@10.200.31.132:/home/gmt/ ``` \ No newline at end of file diff --git a/Recognition/Programing/Linux/Linux 명령어/리눅스 ls 정렬해서 보기.md b/Recognition/Programing/Linux/Linux 명령어/리눅스 ls 정렬해서 보기.md new file mode 100644 index 0000000..b62c39d --- /dev/null +++ b/Recognition/Programing/Linux/Linux 명령어/리눅스 ls 정렬해서 보기.md @@ -0,0 +1,6 @@ +```shell + +# 시간순 정렬 +ls -t -r -l + +``` \ No newline at end of file diff --git a/Recognition/Programing/Linux/Linux 명령어/리눅스 mkdir.md b/Recognition/Programing/Linux/Linux 명령어/리눅스 mkdir.md new file mode 100644 index 0000000..5b3a612 --- /dev/null +++ b/Recognition/Programing/Linux/Linux 명령어/리눅스 mkdir.md @@ -0,0 +1,7 @@ +```bash + +# 모든 폴더 자동 생성 +mkdir -p vehicles/{sedan,coupe,convertible,truck} + + +``` \ No newline at end of file diff --git a/Recognition/Programing/Linux/Linux 명령어/리눅스 데몬 서비스 관련.md b/Recognition/Programing/Linux/Linux 명령어/리눅스 데몬 서비스 관련.md new file mode 100644 index 0000000..567af10 --- /dev/null +++ b/Recognition/Programing/Linux/Linux 명령어/리눅스 데몬 서비스 관련.md @@ -0,0 +1,22 @@ +```bash + +``` + +##### 서비스 삭제 +```bash + +systemctl stop [servicename].service +systemctl disable [servicename].service +rm /etc/systemd/system/[servicename].service +rm /etc/systemd/system/[servicename].service # and symlinks that might be related +rm /usr/lib/systemd/system/[servicename].service +rm /usr/lib/systemd/system/[servicename].service # and symlinks that might be related +systemctl daemon-reload +systemctl reset-failed + + + + + + +``` \ No newline at end of file diff --git a/Recognition/Programing/Linux/Linux 명령어/리눅스 특정 폴더, 파일 용량 확인.md b/Recognition/Programing/Linux/Linux 명령어/리눅스 특정 폴더, 파일 용량 확인.md new file mode 100644 index 0000000..429acab --- /dev/null +++ b/Recognition/Programing/Linux/Linux 명령어/리눅스 특정 폴더, 파일 용량 확인.md @@ -0,0 +1,5 @@ +``` shell + +du -h --max-depth=1 /home/gmt/ + +``` \ No newline at end of file diff --git a/Recognition/Programing/Linux/Linux 명령어/리눅스 확장자 일괄 변경.md b/Recognition/Programing/Linux/Linux 명령어/리눅스 확장자 일괄 변경.md new file mode 100644 index 0000000..683e69f --- /dev/null +++ b/Recognition/Programing/Linux/Linux 명령어/리눅스 확장자 일괄 변경.md @@ -0,0 +1,8 @@ +#Linux +```bash + +# .jpi의 확장자파일을 찾아서 .hpi로 변경 + +ls | grep '.jpi' | cut -d . -f 1 | while read line; do mv $line.jpi $line.hpi; done + +``` \ No newline at end of file diff --git a/Recognition/Programing/Linux/Linux 명령어/무제 폴더/desktop.ini b/Recognition/Programing/Linux/Linux 명령어/무제 폴더/desktop.ini deleted file mode 100644 index e39dc6a..0000000 --- a/Recognition/Programing/Linux/Linux 명령어/무제 폴더/desktop.ini +++ /dev/null @@ -1,2 +0,0 @@ -[.ShellClassInfo] -IconResource=C:\Program Files\Google\Drive File Stream\79.0.2.0\GoogleDriveFS.exe,23 diff --git a/Recognition/Programing/Linux/Linux 프로그램/리눅스 crontab.md b/Recognition/Programing/Linux/Linux 프로그램/리눅스 crontab.md new file mode 100644 index 0000000..14d0f94 --- /dev/null +++ b/Recognition/Programing/Linux/Linux 프로그램/리눅스 crontab.md @@ -0,0 +1,14 @@ +#Linux + +- tibero archive log 일괄 삭제 스크립트 +``` +#! /bin/bash + +# +---------------------------------+ +# tibero archive log delete +# +---------------------------------+ +find /sdata1/tbarch/ -mtime +3 -type f -delete + + +``` + diff --git a/Recognition/Programing/Linux/RHEL9/HAProxy HA (High Availability) 구성하기.md b/Recognition/Programing/Linux/RHEL9/HAProxy HA (High Availability) 구성하기.md new file mode 100644 index 0000000..9b4663c --- /dev/null +++ b/Recognition/Programing/Linux/RHEL9/HAProxy HA (High Availability) 구성하기.md @@ -0,0 +1,274 @@ +##### HA 구성 +``` bash + +# keepalived 설치 +dnf install keepalived -y + +# HAProxy 설치 +dnf install haproxy -y + +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- + +# keepalived 기본 구성 파일을 편집 +nano /etc/keepalived/keepalived.conf +## MASTER를 BACKUP으로, 110을 100으로 변경 +-------------------------------------------------------------------------------------- +global_defs { + # Keepalived process identifier + router_id LVS_ELK +} + + # Nginx가 실행 중인지 확인하는 스크립트 +vrrp_script check_nginx { + script "/etc/keepalived/check_alived.sh" + interval 2 + weight 50 +} + + # Virtual interface - 우선 순위는 장애 조치 시 할당된 인터페이스가 인계받는 순서를 지정합니다. +vrrp_instance VI_01 { + state MASTER + interface bond0 + virtual_router_id 151 + priority 110 + + # 가상IP + virtual_ipaddress { + 10.200.31.129/24 + } + track_script { + check_alived + } + authentication { + auth_type AH + auth_pass secret + } +} +-------------------------------------------------------------------------------------- + +# keepalived 서비스 확인 스크립트 작성 +nano /etc/keepalived/check_alived.sh +-------------------------------------------------------------------------------------- +#!/bin/sh + +exit 0 + +if [ -z "`pidof nginx`" ]; then + exit 1 +fi + +nc -z localhost 8080 &> /dev/null +result1=$? + +if [ $result1 == 1 ]; then + + exit 1 + +fi + +nc -z localhost 8090 &> /dev/null +result1=$? + +if [ $result1 == 1 ]; then + + exit 1 + +fi +-------------------------------------------------------------------------------------- + +# 스크립트 권한 설정 +chmod 755 /etc/keepalived/check_alived.sh + +# keepalived 서비스 실행 +systemctl enable keepalived && +systemctl start keepalived && +systemctl status keepalived + +# 가상 ip 설정 상태 확인 +ip add show + +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- + +# HAProxy 구성파일 편집 (서비스 포트 Healsh-check) +## 1,2번 서버 모두 동일하게 설정 +nano /etc/haproxy/haproxy.cfg +-------------------------------------------------------------------------------------- +#--------------------------------------------------------------------- +# Example configuration for a possible web application. See the +# full configuration options online. +# +# https://www.haproxy.org/download/1.8/doc/configuration.txt +# +#--------------------------------------------------------------------- + +#--------------------------------------------------------------------- +# Global settings +#--------------------------------------------------------------------- +global + # to have these messages end up in /var/log/haproxy.log you will + # need to: + # + # 1) configure syslog to accept network log events. This is done + # by adding the '-r' option to the SYSLOGD_OPTIONS in + # /etc/sysconfig/syslog + # + # 2) configure local2 events to go to the /var/log/haproxy.log + # file. A line like the following can be added to + # /etc/sysconfig/syslog + # + # local2.* /var/log/haproxy.log + # + log 127.0.0.1:514 local2 + + chroot /var/lib/haproxy + pidfile /var/run/haproxy.pid + maxconn 4000 + user haproxy + group haproxy + daemon + + # turn on stats unix socket + stats socket /var/lib/haproxy/stats + + # utilize system-wide crypto-policies + ssl-default-bind-ciphers PROFILE=SYSTEM + ssl-default-server-ciphers PROFILE=SYSTEM + +#--------------------------------------------------------------------- +# common defaults that all the 'listen' and 'backend' sections will +# use if not designated in their block +#--------------------------------------------------------------------- +defaults + defaults + defaults + mode http + log global + option httplog + option dontlognull + option http-server-close + option forwardfor except 127.0.0.0/8 + option redispatch + retries 3 + timeout http-request 10s + timeout queue 1m + timeout connect 10s + timeout client 1m + timeout server 1m + timeout http-keep-alive 10s + timeout check 10s + maxconn 3000 + +#--------------------------------------------------------------------- +# main frontend which proxys to the backends +#--------------------------------------------------------------------- +frontend http_front + bind *:19200 + default_backend http_back + +#--------------------------------------------------------------------- +# round robin balancing between the various backends +#--------------------------------------------------------------------- +backend http_back + server main 10.200.31.130:9200 check fall 3 rise 2 + server backup 10.200.31.132:9200 check fall 3 rise 2 backup + +frontend http_front_5601 + bind *:15601 + default_backend http_back_5601 + +backend http_back_5601 + server main 10.200.31.130:5601 check fall 3 rise 2 + server backup 10.200.31.132:5601 check fall 3 rise 2 backup + +listen hastats + mode http + bind *:9900 + stats enable + stats show-legends + stats uri /haproxy-status + + +#--------------------------------------------------------------------- +# TEST +#--------------------------------------------------------------------- +frontend http_front_8080 + bind *:18080 + default_backend http_back_8080 + + +backend http_back_8080 + server main 10.200.31.130:8080 check fall 3 rise 2 + server backup 10.200.31.132:8080 check fall 3 rise 2 backup + +frontend http_front_9090 + bind *:19090 + default_backend http_back_9090 + + +backend http_back_9090 + server main 10.200.31.130:9090 check fall 3 rise 2 + server backup 10.200.31.132:9090 check fall 3 rise 2 backup +-------------------------------------------------------------------------------------- + + +# HAProxy 서비스 실행 +systemctl enable haproxy && +systemctl start haproxy && +systemctl status haproxy + + + +``` + +##### HAProxy 로깅 +```bash +# rsyslog 구성 파일 수정 +nano /etc/rsyslog.conf + +-------------------------------------------------------------------------------------- +... +## 아래 두줄 주석 해제 +module(load="imudp") # needs to be done just once +input(type="imudp" port="514") + +## 로깅 경로 추가 +local2.* /var/log/haproxy/haproxy.log +local2.notice /var/log/haproxy/haproxy_notice.log + +... +-------------------------------------------------------------------------------------- + +# rsyslog 서비스 재시작 +systemctl restart rsyslog + +# haproxy 구성 파일 수정 +nano /etc/haproxy/haproxy.cfg +------------------------------------------------------------------------------------- +gloal +... + ## 포트 추가작성(514, UDP) + log 127.0.0.1:514 local2 + +... +-------------------------------------------------------------------------------------- + +# haproxy 재시작 + + +# 로깅파일 rotate +nano /etc/logrotate.d/haproxy +-------------------------------------------------------------------------------------- +## 파일명 설정 부분 변경(범용 설정 * ) + /var/log/haproxy/haproxy*.log + +-------------------------------------------------------------------------------------- + +systemctl restart haproxy + + + +``` \ No newline at end of file diff --git a/Recognition/Programing/Linux/RHEL9/NGINX HA (High Availability) 구성하기.md b/Recognition/Programing/Linux/RHEL9/NGINX HA (High Availability) 구성하기.md new file mode 100644 index 0000000..199753b --- /dev/null +++ b/Recognition/Programing/Linux/RHEL9/NGINX HA (High Availability) 구성하기.md @@ -0,0 +1,309 @@ +```shell + +# nginx 설치 확인 +nginx +or +dnf install nginx -y + +# keepalived 설치 확인 +keepalived +or +dnf install keepalived -y + +# service 사용, 상태 확인 +systemctl enable nginx +systemctl start nginx + +systemctl enable keepalived +systemctl start keepalived + +# index.thml 수정 (테스트시 노드 구분 하기 위함) +nano /usr/share/nginx/html/index.html + +# keepalived 기본 구성 파일을 편집 +nano /etc/keepalived/keepalived.conf +-------------------------------------------------------------------------------------------- +global_defs { + # Keepalived process identifier + router_id LVS_ELK +} + + # Nginx가 실행 중인지 확인하는 스크립트 +vrrp_script check_nginx { + script "/etc/keepalived/check_nginx.sh" + interval 2 + weight 50 +} + + # Virtual interface - 우선 순위는 장애 조치 시 할당된 인터페이스가 인계받는 순서를 지정합니다. +vrrp_instance VI_01 { + state MASTER + interface bond0 + virtual_router_id 151 + priority 110 + + # 가상IP + virtual_ipaddress { + 10.200.31.129/24 + } + track_script { + check_nginx + } + authentication { + auth_type AH + auth_pass secret + } +} +-------------------------------------------------------------------------------------------- +## MASTER를 BACKUP으로, 110을 100으로 변경 + +# 실행중인지 확인 스크립트 작성 +nano /etc/keepalived/check_nginx.sh + +#!/bin/sh +if [ -z "`pidof nginx`" ]; then + exit 1 +fi + +# 스크립트 권한 설정 +chmod 755 /etc/keepalived/check_nginx.sh + +systemctl enable keepalived +systemctl start keepalived + +# 가상 ip 설정 상태 확인 +ip add show + +``` + + + + + + +```shell +https://www.nakjunizm.com/2020/02/20/haproxy/ +https://bryan.wiki/243 + +https://www.owl-dev.me/blog/74 + +haproxy +nginx +keepalived +------------------------------------------------------------------------- +https://bkim.tistory.com/12 + +# nginx 다운로드 (https://nginx.org/download) +# 의존성 라이브러리 다운로드 +## PCRE (https://sourceforge.net/projects/pcre/files/pcre/) +## zlib (http://zlib.net) 최신 버전 확인 후 --> http://zlib.net/zlib-1.3.1.tar.gz +## OpenSSL (http://www.openssl.org/source) + + + + +# nginx 압축풀기 +tar -zxvf nginx-1.20.2.tar.gz +cd nginx-ha/nginx-1.20.2 + +tar -zxvf pcre-8.39.tar.gz +tar -zxvf zlib-1.3.1.tar.gz + +# 설정 파일 수정 +nano conf/nginx.conf + +## location / { ... 밑에 추가 +location /nginx_status { + stub_status; + allow 127.0.0.1; + deny all; +} + +# nginx 설치 2 +./configure --prefix=/home/gmt/SACP-INSTALL/nginx --user=root --with-http_stub_status_module make && make install + +./configure --prefix=/home/gmt/SACP-INSTALL/nginx-ha/nginx --with-zlib=./zlib-1.3.1 --with-pcre=./pcre-8.39 --with-http_stub_status_module +make install + +## --with-http_stub_status_module: nginx stats page 적용을 위한 옵션 +## ssl 적용 필요시 --with-openssl=./openssl-1.0.2 --with-http_ssl_module + +# Service 파일 생성 +nano /usr/lib/systemd/system/nginx.service + +-------------------------------------------------------------------------------------------- +[Unit] + +Description=The NGINX HTTP and reverse proxy server + +After=syslog.target network.target remote-fs.target nss-lookup.target + + + +[Service] + +Type=forking + +PIDFile=/home/gmt/SACP-INSTALL/nginx-ha/nginx-1.20.2/nginx.pid + +ExecStartPre=/usr/local/nginx/sbin/nginx -t + +ExecStart=/usr/local/nginx/sbin/nginx + +ExecReload=/usr/local/nginx/sbin/nginx -s reload + +ExecStop=/bin/kill -s QUIT $MAINPID + +PrivateTmp=true + + +[Install] + +WantedBy=multi-user.target +-------------------------------------------------------------------------------------------- + +# nginx.confg PID 위치 설정 +cd /usr/local/nginx/conf +nano nginx.conf +-------------------------------------------------------------------------------------------- +worker_processes 1; + +pid /var/run/nginx.pid; + + +.... + +http{ + +... + +} +-------------------------------------------------------------------------------------------- + +# deamon 리로드 +systemctl daemon-reload +systemctl status nginx + + +# keepalived 설치 +tar -zxvf keepalived-1.1.19.tar.gz + +# Keepalived configureation +cd [keepalived Root] + +nano ./keepalived.conf + +# MASTER +vrrp_script check_nginx { + script "killall -0 nginx" + interval 2 +} + +vrrp_instance VI_1 { + interface eth0 + state MASTER + priority 200 + + virtual_router_id 33 + virtual_ipaddress { + 10.205.199.200 # 가상 IP + } + + authentication { + auth_type PASS + auth_pass password + } + + track_script { + check_nginx + } + +} + +# BACKUP + script "killall -0 nginx" + interval 2 +} + +vrrp_instance VI_1 { + interface eth0 + state BACKUP + priority 100 + + virtual_router_id 33 + virtual_ipaddress { + 10.205.199.200 + } + + authentication { + auth_type PASS + auth_pass password + } + + track_script { + check_nginx + } + +} + +# keepalived 실행 + + + + + + +``` + + + + +```bash + +# 설치 +apt-get install nginx-ha-keepalived +## /usr/bin으로 설치됨 + +# 스크립트 실행 +nginx-ha-setup +## /etc/keepalived/keepalived.conf가 생성됨 + +# keepalived 구성 스크립트 수정 + +# health check 기능 구성 +vrrp_script chk_nginx_service { + script "/usr/libexec/keepalived/nginx-ha-check" # nginx-ha-check 스크립트 경로 + interval 3 # 스크립트가 실행되는 빈도 (초 단위) + weight 50 # 가중치, priority와 함께 어떤 노드가 기본 노드가 될지 결정하는데 사용됨. + # 50 + 101 = 151.. 높을수록 우선순위 높음. + # NGINX Plus 관리자 가이드 문서에서 health check 스크립트 참조. +} + +# 노드 VRRP 인스턴스를 구성 +vrrp_instance VI_1 { + interface eth0 + state BACKUP + priority 101 + virtual_router_id 51 # 샘플값(필요에 따라 환경에서 고유하도록 변경) + advert_int 1 # 기본 노드의 VRRP인스턴스가 백업 노드 피어에 보내는 빈도(초) + unicast_src_ip 192.168.100.100 # 로컬 노드 + unicast_peer { + 192.168.100.101 # 다른 노드 + } + authentication { + auth_type PASS + auth_pass f8f0e5114cbe031a3e1e622daf18f82a + } + virtual_ipaddress { + 192.168.100.150 # 기본 노드에 할당된 가상 IP + } + track_script { + chk_nginx_service + } + notify "/usr/libexec/keepalived/nginx-ha-notify" +} + + + + +``` \ No newline at end of file diff --git a/Recognition/Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md b/Recognition/Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md index 9fdb708..a0183e0 100644 --- a/Recognition/Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md +++ b/Recognition/Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md @@ -12,4 +12,7 @@ netstat -tnlp|grep 20001 # 프로세스 강제 종료 kill -9 1234 +# 프로세스 경로 확인 + netstat -ntap | grep LISTEN | grep 80 + ls -al /proc/4091928 | grep exe ```` \ No newline at end of file diff --git a/Recognition/Programing/Tibero/테이블 컬럼 코멘트 조회.md b/Recognition/Programing/Tibero/테이블 컬럼 코멘트 조회.md new file mode 100644 index 0000000..991857a --- /dev/null +++ b/Recognition/Programing/Tibero/테이블 컬럼 코멘트 조회.md @@ -0,0 +1,11 @@ +```sql + +select comments +from ALL_COL_COMMENTS a, ALL_TAB_COLUMNS b +where b.table_name = 'EAI_AWOS_RCV' +and a.table_name(+) = b.table_name +and a.column_name(+) = b.column_name +order by b.column_id + + +``` \ No newline at end of file diff --git a/Recognition/Tools/VSCode_Server/Maven 설치.md b/Recognition/Tools/VSCode_Server/Maven 설치.md index 56bc29f..f51dd6e 100644 --- a/Recognition/Tools/VSCode_Server/Maven 설치.md +++ b/Recognition/Tools/VSCode_Server/Maven 설치.md @@ -14,7 +14,7 @@ mkdir apache-maven wget https://archive.apache.org/dist/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz -p /root/apache-maven/ # 압축푹기 -tar -xvf apache-maven-3.0.4-bin.tar.g +tar -xvf apache-maven-3.0.4-bin.tar.gz # 환경변수 등록 cd diff --git a/Recognition/Work Related/1.업무메모/2022-11-11.md b/Recognition/Work Related/1.업무메모/2023/2022-11-11.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2022-11-11.md rename to Recognition/Work Related/1.업무메모/2023/2022-11-11.md diff --git a/Recognition/Work Related/1.업무메모/2023-02-14.md b/Recognition/Work Related/1.업무메모/2023/2023-02-14.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-02-14.md rename to Recognition/Work Related/1.업무메모/2023/2023-02-14.md diff --git a/Recognition/Work Related/1.업무메모/2023-03-27.md b/Recognition/Work Related/1.업무메모/2023/2023-03-27.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-03-27.md rename to Recognition/Work Related/1.업무메모/2023/2023-03-27.md diff --git a/Recognition/Work Related/1.업무메모/2023-03-28.md b/Recognition/Work Related/1.업무메모/2023/2023-03-28.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-03-28.md rename to Recognition/Work Related/1.업무메모/2023/2023-03-28.md diff --git a/Recognition/Work Related/1.업무메모/2023-03-29.md b/Recognition/Work Related/1.업무메모/2023/2023-03-29.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-03-29.md rename to Recognition/Work Related/1.업무메모/2023/2023-03-29.md diff --git a/Recognition/Work Related/1.업무메모/2023-03-30.md b/Recognition/Work Related/1.업무메모/2023/2023-03-30.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-03-30.md rename to Recognition/Work Related/1.업무메모/2023/2023-03-30.md diff --git a/Recognition/Work Related/1.업무메모/2023-04-03.md b/Recognition/Work Related/1.업무메모/2023/2023-04-03.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-04-03.md rename to Recognition/Work Related/1.업무메모/2023/2023-04-03.md diff --git a/Recognition/Work Related/1.업무메모/2023-04-06.md b/Recognition/Work Related/1.업무메모/2023/2023-04-06.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-04-06.md rename to Recognition/Work Related/1.업무메모/2023/2023-04-06.md diff --git a/Recognition/Work Related/1.업무메모/2023-04-07.md b/Recognition/Work Related/1.업무메모/2023/2023-04-07.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-04-07.md rename to Recognition/Work Related/1.업무메모/2023/2023-04-07.md diff --git a/Recognition/Work Related/1.업무메모/2023-04-12.md b/Recognition/Work Related/1.업무메모/2023/2023-04-12.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-04-12.md rename to Recognition/Work Related/1.업무메모/2023/2023-04-12.md diff --git a/Recognition/Work Related/1.업무메모/2023-05-08.md b/Recognition/Work Related/1.업무메모/2023/2023-05-08.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-05-08.md rename to Recognition/Work Related/1.업무메모/2023/2023-05-08.md diff --git a/Recognition/Work Related/1.업무메모/2023-05-23.md b/Recognition/Work Related/1.업무메모/2023/2023-05-23.md similarity index 100% rename from Recognition/Work Related/1.업무메모/2023-05-23.md rename to Recognition/Work Related/1.업무메모/2023/2023-05-23.md diff --git a/Recognition/Work Related/1.업무메모/2024-03-25.md b/Recognition/Work Related/1.업무메모/2024-03-25.md new file mode 100644 index 0000000..5c7fdf7 --- /dev/null +++ b/Recognition/Work Related/1.업무메모/2024-03-25.md @@ -0,0 +1,167 @@ +SFR-27 +1. 플랫폼 감시 +2. 플랫폼 제어 + - ~~하부시스템에 대한 Start, Stop, Restart, Shutdown 동작~~ + - 응용프로그램 설치 및 update + +3. 플랫폼 관리 + - 설치된 SW 버전 관리 + - S/W 별 버전 정보 이력이 표시 된다. + - 최신 SW 및 어플리케이션 관리 + - ~~운영환경 관리 + - 관리시스템 S/W + +#### Jenkins Book +https://www.jenkins.io/doc/book/blueocean/ + +###### Jenkins 사용 +https://dev-overload.tistory.com/39 + +###### Jenkins 설치 +https://marindie.github.io/jenkins/Ubuntu-Jenkins-Install-KR-copy/#google_vignette +https://server-engineer.tistory.com/763 + +https://ppoble.tistory.com/52#google_vignette + +https://hwannny.tistory.com/89 + +###### Jenkins + Docker +https://1minute-before6pm.tistory.com/49 + +##### 특정 파일만 배포 +https://hye0-log.tistory.com/42 +https://velog.io/@ysy3285/GitLab-Jenkins-CICD-%EA%B5%AC%EC%B6%95%ED%95%98%EA%B8%B02 +https://g4daclom.tistory.com/78 + +젠킨스 플러그인 사이트 : https://plugins.jenkins.io/ + + +publish over ssh 대체 +SSH Plugin : https://ktaes.tistory.com/100 + +---- + +##### Docker-compose +```bash + +# 인터넷 연결되는 환경에서 작업 +# docker image, jenkins plugin 파일 다운받아야함. + +mkdir ./jenkins && cd jenkins +mkdir ./jenkins_home +nano docker-compose-jenkins.yml + +-------------------------------------------------------------------------------- +version: '3.8' +services: + jenkins: + image: jenkins/jenkins:lts + container_name: jenkins + user: root +# environment: +# - TZ=Asia/Seoul + privileged: true + ports: + - 9900:8080 +# - 9000:50000 + volumes: + - ./jenkins_home:/var/jenkins_home + - /var/run/docker.sock:/var/run/docker.sock + restart: unless-stopped +-------------------------------------------------------------------------------- +docker-compose build && docker-compose up -d + + +# Jenkins Unlock Password 확인 (Unlock 이후 파일 삭제됨) +cat ./jenkins_home/secrets/initialAdminPassword + +# jenkins 페이지 초기 설정 +1. http://{hostname}:9900 접속하여 Unlock +2. 계정 생성 +3. Jenkins URL 정보 확인 및 수정 +Start using Jenkins 버튼 + + +# Install Suggested plugins 선택하여 기본 plugin 설치 +# 또는 Plugin 수동 설치 [Plugin 수동 설치] + +# 추가 플러그인 설치 +> Jenkins 관리 -> Jenkins Global Tool Configuration +publish over ssh +maven +jdk + + +# publish over ssh 설정 + +# SSH key 발급 +docker exec -it jenkins bash + +ssh-keygen + +cat /root/.ssh/id_rsa + +------------------------------------------------------- +#배포 대상 서버 설정 +## jenkins 서버에서 내용복사 +cat /root/.ssh/id_rsa.pub + +## 배포서버 root 로그인 +## 파일생성하고 복사한 내용 붙여넣기 +nano /root/.ssh/authorized_keys + +## 폴더, 파일 권한 변경 +chmod 700 /root/.ssh +chmod 644 /root/.ssh/authorized_keys +--------------------------------------------------------- + +# Jenkins 페이지에서 배포서버 추가 +Dashboard > Jenkins 관리 >System +Publish over SSH > 추가 + + + + +``` + +https://velog.io/@wijoonwu/AWS-Jenkins-%EC%9E%90%EB%8F%99-%EB%B0%B0%ED%8F%AC + +##### Plugin 수동 설치 +```bash + + +cp -r jenkins_home/plugins/*.jpi jenkins_plugins/ + +ls | grep '.jpi' | cut -d . -f 1 | while read line; do mv $line.jpi $line.hpi; done + +tar -cvf plugins.tar ./jenkins_plugins + + +# 수동설치 할 서버 +tar -xvf plugins.tar -C /home/gmt/jenkins_home/plugins/ + + +``` + + +``` + + +```bash + +ssh-keygen + + +cat /root/.ssh/id_rsa + + + +``` + + + + +##### 기타 +- CI(Continuous Integration) +- CD(Continuous Delivery/Deployment) +- Unity 연동 (https://github.com/KorStrix/Unity_JenkinsBuilder) \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md b/Recognition/Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md index 104f5c3..aca569d 100644 --- a/Recognition/Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md +++ b/Recognition/Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md @@ -12,6 +12,9 @@ - https://docs.google.com/spreadsheets/d/1p07GOVObBReD6Xs82gk6_YzhQqJhaa4IP98i7xFtTMk/edit?usp=sharing - https://docs.google.com/spreadsheets/d/1eO4Nqkqbx-Cqn8v8cMKc1XrlYkQ218Un9MNUkwLbKXM/edit#gid=1329685206 +- 스마트시트 +https://app.smartsheet.com/b/home + - ELK http://118.220.143.172:5601/app/dev_tools#/console diff --git a/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/항공기 등급 기준.md b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/항공기 등급 기준.md new file mode 100644 index 0000000..e918602 --- /dev/null +++ b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/항공기 등급 기준.md @@ -0,0 +1,3 @@ +https://airtravelinfo.kr/wiki/index.php?title=%ED%95%AD%EA%B3%B5%EA%B8%B0_%EB%93%B1%EA%B8%89#google_vignette + +![[Pasted image 20240320095219.png]] \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/9.기타/Filebeat 재배포.md b/Recognition/Work Related/프로젝트/스마트계류장/9.기타/Filebeat 재배포.md new file mode 100644 index 0000000..6753937 --- /dev/null +++ b/Recognition/Work Related/프로젝트/스마트계류장/9.기타/Filebeat 재배포.md @@ -0,0 +1,39 @@ +Filebeat 재배포 + +```bash + +systemctl stop filebeat.service && +systemctl disable filebeat.service && +rm -f /usr/lib/systemd/system/filebeat.service && +systemctl daemon-reload && +systemctl reset-failed && +ps -ef | grep filebeat + + + +cd /home/gmt/app && +rm -rf filebeat && +tar -xvf filebeat.tar && +rm -f filebeat.tar && +cd filebeat $$ +chmod -R 755 /home/gmt/app/filebeat && +chown -R gmt:gmt /home/gmt/app/filebeat && +sh /home/gmt/app/filebeat/filebeat_service_reg/service_reg.sh && +ll + + +nano /etc/sudoers + +gmt ALL=(ALL) ALL + +tss_fusion +tss_asde +tss_ana +tss_ai_location + + + +cd /home/gmt/app/filebeat/ && ./start.sh + + +``` \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/9.기타/SACP maven 빌드 명령어.md b/Recognition/Work Related/프로젝트/스마트계류장/9.기타/SACP maven 빌드 명령어.md new file mode 100644 index 0000000..169291f --- /dev/null +++ b/Recognition/Work Related/프로젝트/스마트계류장/9.기타/SACP maven 빌드 명령어.md @@ -0,0 +1,5 @@ +```txt + +mvn clean package -DskipTests + +``` \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/TODO.md b/Recognition/Work Related/프로젝트/스마트계류장/TODO.md index 410968d..08d8507 100644 --- a/Recognition/Work Related/프로젝트/스마트계류장/TODO.md +++ b/Recognition/Work Related/프로젝트/스마트계류장/TODO.md @@ -1,4 +1,4 @@ -- [x] 데이터블럭 뷰 생성 +g- [x] 데이터블럭 뷰 생성 - [x] 도착/출발 항공기 - [x] 계류장 이동 항공기 - [x] 재생용 데이터 블럭 diff --git a/Recognition/zzz.resources/Pasted image 20240320095219.png b/Recognition/zzz.resources/Pasted image 20240320095219.png new file mode 100644 index 0000000..7df772c Binary files /dev/null and b/Recognition/zzz.resources/Pasted image 20240320095219.png differ diff --git a/Recognition/무제 파일.canvas b/Recognition/무제 파일.canvas new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/Recognition/무제 파일.canvas @@ -0,0 +1 @@ +{} \ No newline at end of file