728x90
반응형

Gitlab 프로젝트 VS Code 연결 

  • Gitlab 과  VS Code를 연동   하는 방법에 대해 설명 한다. 

GitLens, Git History  설치

  • VS code 실행 후 마켓 플레이스 에서GitLens, Git History  를 설치한다. 

 

VSCode Git Clone 방법 

  • F1 버튼을 눌러 git clone 선택합니다.
  • Git url 주소를 입력한다. 
    • VS Code 레파지토리 URL 정보 입력 <- gitlab http url 입력 

  • 복제할 로컬 디렉토리를 선택합니다. 
  • 없을경우 신규 생성 합니다. 
  • 작업영역을 추가하면 해당 폴더에 Gitlab 리소스가 로컬 Repository 에 다운로드 됩니다. 

 

VSCode 파일 변경 사항 커밋 

  • 테스트를 위해 test.md 파일을 생성 합니다. 
  • 파일에 간단한 내용을 작성합니다. 

 

  • Source Control  항목에 들어가서 변경 사항에 대한 커밋 메시지를 작성한후 커밋 버튼을 클릭합니다. 

 

  • 이후 변경 내용 동기화 버튼을 클릭 합니다. 
  • 동기화 하지 않으면 Git 서버에 변경내용이 저장 되지 않습니다. 

  • 정상 업로드가 되면 Gitlab 에 추가된 test.md 파일이 업로드 된것을 확인 할수 있습니다. 

 

VS Code MarkDown 확장 패키지 설치 

  • Gitlab 에서 Mark down 문법으로 작성된 문서를 수정하고 또 편하게 보기 위해서는 몇가지 확장 패키를 설치 하면 유용합니다. 
    • Diagram and chart  를 보기위해 아래 패키지를 설치 합니다. 
    • Markdown Preview Mermaid Support

 

  • 확장자를 추가하면 Gitlab 에서 지원하는 다양한 플로우 차트와 다이그램을 VS Code 에서 작성 하고 미리보기 를 통해 확인해볼수 있다. 

 

 

728x90
반응형
728x90
반응형

Remote SSH 원 격 접속 (비번 입력 없이)  방법

  • VSCode 에서 Remote 접속 시에 비밀 번호 없이 입력 없이 접속 하는 방법에 대해 설명합니다. 
  • 아래처럼 Remote 서버 접속시 매번 비밀번호를 입력하게 된다. 
  • 이런 불편한점을 없애고 ssh 인증키를 발급받아 접속하고자하는 Remote 원격 서버에 키를 등록한후 
  • 매번 비밀 번호를 입력한후 접속 하는 수고를 덜수 있다. 

윈도우 ssh-key 발급 

  • Windows PowerShell 을 실행 시킨후 ssh key 를 발급 받습니다. 

 

#ssh 인증키 발급
ssh-keygen -t rsa -b 4096
#인증키 확인
Get-Content .\.ssh\id_rsa.pub

 

 

authorized_keys  파일 생성(Remote 서버) 

.ssh 디렉토리 이동후 authorized_keys  파일 생성후 윈도우 에서 발급 받은 key 값을 복사 한다. 

[rocky@my-rocky9 .ssh]$ ll
합계 12
-rw-r--r--. 1 rocky rocky  578 11월 18 15:40 authorized_keys
-rw-------. 1 rocky rocky 3381 11월 18 15:39 id_rsa
-rw-r--r--. 1 rocky rocky  743 11월 18 15:39 id_rsa.pub

 

VSCode ssh Config 파일 수정

  • vscode ssh 접속 설정 파일에  발급받은 키값을 추가 한다. (IdentityFile D:\200.MyConfig\VSCode\.ssh\id_rsa )
Host rocky-192.168.116.xxx
HostName 192.168.116.xxx
User rocky
Port 22
IdentityFile D:\200.MyConfig\VSCode\.ssh\id_rsa

 

추가후 재섭속시 비밀번호 없이 Remote SSH 접속시 비밀번호 업이 접속 할수 있다. 

 

 

728x90
반응형
728x90
반응형

SVN 설치 

dnf instatall subversion
svn --version

 

SVN 기본 명령어 

  • 리소드 체크 아웃 
svn checkout https://example.com/svn/my_project/trunk
  • 리소스 업데이트 (체크아웃 받은 리소스에 대해 변경된 사항을 로컬로 업데이트 합니다.) 
svn update
  • 파일 상태 확인 
    • M: 수정 파일
    • A: 추가 파일
    • D: 삭제 파일
    • ?: 버전 관리되지 않은 파일
svn status
  • 파일 정보 저장 및 변경 
#파일 추가
svn add new_file.txt
#파일 저장
svn commit -m "추가한 내용 기록"
#파일 삭제
svn delete old_file.txt
#파일 내용 비교
svn diff current_file.txt
#파일 변경 내용 확인
svn log current_file.txt

SVN 트러블 슈팅 

svn: warning: cannot set LC_CTYPE locale 에러 

  • 해당 에러는 SVN 클라이언트가 로케일 설정이 맞지 않을때 발생하는 에러 입니다. 
  • 위 현상을 해결 하기 위해서는 아래 단계로 현재 로케일 설정을 확인하고 환경에 맞는 로케일 로 설정을 맞춰 줍니다. 
  •  
$ svn checkout svn://1~~~
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is UTF-8
svn: warning: please check that your locale name is correct

 

728x90
반응형

'04.DevTools' 카테고리의 다른 글

[IntelliJ] Intellij Gitlab 연동  (0) 2024.08.16
[Nexus]Centos7 nexus 설치 및 이클립스 연동  (0) 2022.04.21
728x90
반응형
  • Gitlab 에서 생성한 프로젝트를 상제하는 방법에 대해 알아봅니다. 

GitLab 에서 생성한 Project(프로젝트)  삭제하는 방법 

  • 삭제하면 되될릴수 없으므로 필히 주의가 필요합니다. 
  • 우선 삭제할 프로젝트를 선택합니다. 
    • Gitlba 로그인후 삭제할 프로젝트 페이지로 이동 합니다. 
    • 삭제할 프로젝트 선택후 하단 Settings -> Gerneral -> Advanced settings  선택후 가장 하단 섹션을 확인합니다. 
    • Delete project 버튼을 클릭해서 생성한 프로젝트를 삭제 합니다. 
    • 이때 프로젝트 이름을 입력 한후 delete 버튼을 클릭해서 프로젝트를 삭제 합니다. 

 

 

728x90
반응형
728x90
반응형

Git은 기본적으로 빈 디렉토리를 추적하지 않기 때문에 빈 디렉토리를 저장할수 없다.  

파일이 없는 빈 디렉토리는 자동으로 무시 되기 때문에 간접적인 방법으로 .gitkeep 파일을 사용 하여 빈디렉토리를 저장 한다. 

 

.gitkeep 파일 사용 방법 

  • 빈파일을 생성 한다. 
mkdir my_empty_directory
  • 디렉토리 안에 .gitkeep 파일을 생성합니다
touch my_empty_directory/.gitkeep
  • 디렉토리를 Git에 추가하고 커밋한다.
# 모든 빈 디렉토릴를 저장 하고 자 할때
git add .
# 특정 빈 디렉토리를 저장하고자 할때
git add my_empty_directory/.gitkeep
git commit -m "Add empty directory my_empty_directory with .gitkeep"

 

  • .gitkeep 파일은 특별한 의미를 가지지 않는 관례적인 이름으로 사용 하며 빈 디렉토리임을 다른 사용자가 의도적으로 비어있는것을 표현해 주는 의미다. 

 

  • git push 
git push origin main

 

728x90
반응형
728x90
반응형
  • IntelliJ 에서 Gitlab 소스를 가져오는 방법에 대해 설명 한다. 

IntelliJ GitLab 연동 설정 

  • File -> new -> Project  from Version Control 클릭 

 

 

  • Repository URL 클릭후 Glit Clone 주소 (HTTP) 를 입력 합니다.
  • Token 주소는 Gitlab 에서 설정한 Project Access Tokens  값을 입력 합니다. 

 

  •  Project Access Tokens  생성 방법 
    • Settions -> Access Tokens -> Token name 설정 -> Select Scope 선택 
    • Create 버튼 클릭 

 

 

  • 정상 적으로 연동이 되면 Gitlab 에 등록한 프로젝트가 IntelliJ 촤측화면에 다운도르 되는것을 볼수 있습니다. 

 

 

IntelliJ GitLab Commit 

  • 프로젝트 선택후 마우스 우측 버튼을 클릭 합니다. 
  • Git -> Commit Directory.... 클릭 합니다. 

 

  • Commit Comment 를 작성하고 Commit and Push 버튼을 클릭 합니다. 

 

 

  • 정상적으로 Gitlab 에 Push 가 업로드 된것을 확인 할수 있습니다. 

 

 

 

728x90
반응형

'04.DevTools' 카테고리의 다른 글

[SVN] SVN 사용법  (0) 2024.11.14
[Nexus]Centos7 nexus 설치 및 이클립스 연동  (0) 2022.04.21
728x90
반응형
  • Visual Studio Code (VS Code) 에서 원격지 리눅스 서버에 접속 하는 방법을 소개합니다. 

 

Visual Studio Code 설치

아래 경로에서 Visual Studio Code 를 다운로드 받습니다. 

https://code.visualstudio.com/

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

 

 

VS Code  실행 및  Remote - SSH  확장 팩을 설치

  • VS code 가 설치가 완료 되었다면 Remote - SSH  확장팩 설치를 진행 합니다. 

 

Remote - SSH  접속 설정 

  • 원격지 서버에 접속 하기 위한 연설 설정 정보를 셋팅 합니다.
  • F1 혹은 Ctrl + Shift + P 버튼을 눌러서 Remote SSH Configuration 파일을 수정 합니다. 
  • ~.ssh/config
Host [alias]
HostName [ip addr]
User [account_name]
Port [port number]
IdentityFile [key location]

 

 

 

Remote 서버 접속 

  • VS Code 에서 Centos7 서버에 접속을 합니다. 
  • .ssh/config 에 작성한 접속 정보를 이용해서 원격지 서버에 접속을 합니다. 

 

  • 정상적으로 접속이 되면 아래와 같이 원격지 서버에서 접속해서 간단한 테스트를 진행 해볼수 있습니다. 
  • test.sh 라는 쉘 스크립트를 작성 하고 아래 터미널 창에서 수행을 합니다. 

728x90
반응형
728x90
반응형

이번글에서는 윈도우 환경에서 C 언어로 작성된 프로그램을 컴파일하고 실행하는 방법에 대해 알아보겠습니다. 

리눅스 환경에서  윈도우환경에서  gcc 설치후 C 코드 컴파일하고 실행 방법에 대해 소개 하도록 하겠습니다. 

 

환경 구성

Window 10  환경에서 VS Code 와 Mingw 를 설치하도록 하겠습니다. 

  • 윈도우 10 
  • Visual Studio Code (VS Code)
  • GCC 8 (Mingw)

GCC 8설치

 

아래 경로에서 다운로드를 받습니다. 

Installer 도 있지만 설치시 제 환경에서는 에러가 발생해서 바이너리 다운로드후 압축 해제 했습니다. 

 

https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/ 

 

하단 스크롤 하면 다운로드 매뉴가 나옵니다. 

 

Download x86_64-8.1.0-release-win32-seh-rt_v6-rev0.7z (MinGW-w64 - for 32 and 64 bit Windows)

A complete runtime environment for gcc The mingw-w64 project is a complete runtime environment for gcc to support binaries native to Windows 64-bit and 32-bit operating systems.

sourceforge.net

  • 다운로드 받은 바이너리를 C Drive 에 폴더를 생성하고 압축을 해제 합니다. 
  • mingw64 -> x86_64-8.1.0-release-win32-seh-rt_v6-rev0.7z 바이너리 압축 해제 

 

윈도우 환경 변수 설정 

  • 시스템 -> 시스템 속성 -> 환경 변수 -> 환경 변수 편집 -> C:\mingw64\bin 추가 

 

GCC 설치 버전 확인 

  • Win + R 버튼 클릭후 cmd 창에서 설치 버전을 확인 합니다.
C:\>gcc --version
gcc (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


C:\>g++ --version
g++ (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

 

Visual Studio Code (VS Code) 설치 

아래 경로에서 Visual Studio Code 를 다운로드 받습니다. 

https://code.visualstudio.com/

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

 

 

VS Code  실행 및  C/C++ 확장 팩을 설치

  • VS code 가 설치가 완료 되었다면 c/c++ 확장팩 설치를 진행 합니다. 
  • Ctrl + Shift + x 
  • C/C++ Extension Pack

 

VS Code  C 컴파일 환경 설정 

  • Ctrl +Shift + P -> c/c++ Edit configurations 검색 -> 톱니바퀴 클릭 

 

 

gcc 컴파일 경로 설정 

  • UI 화면에서 설정을 변경 할수 있도 있고  c_cpp_properties.json 버튼을 클릭 하면 파일 에서 직접 수정 할수도 있습니다. 

 

C/C++ 환경 설정 

  • 컴파일러 경로 설정 
  • IntelliSense 모드 설정 
  • Include 경로 추가 

 

  •  c_cpp_properties.json 파일 
{
"configurations": [
{
"name": "Win32",
"includePath": [
"C:/Program Files (x86)/Windows Kits/8.0/Include/um",
"C:/Program Files (x86)/Windows Kits/8.0/Include/shared",
"C:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include",
"C:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-gcc-x64",
"browse": {
"path": []
},
"compilerPath": "C:/mingw64/bin/gcc.exe",
"compilerArgs": []
}
],
"version": 4
}

 

빌드 환경 구성 

  • F1 버튼 클릭 -> Task: Configure Default build Task 검색 
  • tasks.json 편집 (gcc 설치한 디렉토리로 설정 합니다. 
{
"version": "2.0.0",
"runner": "terminal",
"type": "shell",
"echoCommand": true,
"presentation": {
"reveal": "always"
},
"tasks": [
{
"label": "save and compile for C++",
"command": "g++",
"args": [
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"group": "build",
"problemMatcher": {
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "save and compile for C",
"command": "gcc",
"args": [
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"group": "build",
"problemMatcher": {
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "execute",
"command": "cmd",
"group": "build",
"args": [
"/C",
"${fileDirname}\\${fileBasenameNoExtension}"
],
"problemMatcher": []
},
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 활성 파일 빌드",
"command": "C:\\mingw64\\bin\\gcc.exe",
"args": [
"-g",
"-lm",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "디버거에서 생성된 작업입니다."
},
{
"type": "cppbuild",
"label": "C/C++: g++.exe 활성 파일 빌드",
"command": "C:\\mingw64\\bin\\g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "디버거에서 생성된 작업입니다."
},
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 활성 파일 빌드",
"command": "C:\\mingw64\\bin\\gcc.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"-lm"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "test"
}
]
}

 

C 코드 테스트 

기본 테스트 

test.c 파일 을 만들어 테스트 코드를 작성합니다. 

#include <stdio.h>
int main()
{
printf("Hello, world!\n");
printf("C Program Compile Test \n");
return 0;
}

 

실행 매뉴 버튼 클릭후 테스트 코드를 컴파일 및 실행 합니다. 

  • 디버깅 없이 실행 (Ctrl+F5)

 

테스트 결과 

 

입력변수 설정을 통한 컴파일 및 실행 

  • 컴파일 후에 입력 변수 설정을 통해 실행을 할수도 있습니다. 
  • 기존에 작성했던 코드를 조금 수정 합니다. 
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("1 번째 [%s]:\n",argv[1]);
printf("2 번째 [%s]:\n",argv[2]);
printf("Hello, world!\n");
printf("C Program Compile Test \n");
return 0;
}

 

  • 테스트 프로젝트 하위 .vscode 디렉 토리 밑에  launch.json 파일을 생성 합니다. 
  • .vscode 디렉토리 에는 기존에 환경 설정한 tasks.json , c_cpp_properties.json 파일도 생성되어 있습니다. 
  • 동일 디렉토리 launch.json 파일을 만들고 환경 설정 내용을 작성 합니다. 
  • 입력 값은  "args": ["1 args ","2 args "], 형식으로 작성합니다. 

 launch.json

{
// IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
// 기존 특성에 대한 설명을 보려면 가리킵니다.
// 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요.
"version": "0.2.0",
"configurations": [
{
"name": "gcc.exe - 활성 파일 빌드 및 디버그",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\build\\${fileBasenameNoExtension}.exe",
"args": ["1 args ","2 args "],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "gdb에 자동 서식 지정 사용",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc.exe 활성 파일 빌드"
},
]
}

 

실행 매뉴 버튼 클릭후 테스트 코드를 컴파일 및 실행 합니다. 

  • 디버깅 없이 실행 (Ctrl+F5)

실행을 하면 입력 한 변수 값도 실행시에 프로그램에 전달 할수 있습니다. 

 

 

728x90
반응형
728x90
반응형

nexus repository

Nexus 란?

라이브러리 사설 Repository 이며 Maven Repository 와 유사 소스코드 관리 하는 Git 이나 Svn 과는 달리 라이브러리 버전 관리 및 배포를 담당한다.

Nexus 계정 생성

  • 먼저 nexus 계정 생합니다. 
[root@centos7:/root]$ adduser nexus
[root@centos7:/root]$ passwd nexus
nexus 사용자의 비밀 번호 변경 중
새  암호:
새  암호 재입력:
passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다.
  • nexus 계정 root 권한 부여(/etc/sudoers)

/etc/sudoers 파일을 수정권한이 없기 때문에 파일 수정 권한 변경후 수정해야 합니다. 

수정 이후에는 다시 권한을 해제해 주세요 

  • chmod u+w /etc/sudoers    
  • vi /etc/sudoers
  • chmod u-w /etc/sudoers   
## Allow root to run any commands anywhere 
root    ALL=(ALL)       ALL
oracle-docker ALL=(ALL) ALL
nexus ALL=(ALL) ALL

Nexus  바이너리 설치 및 다운로드 

  • nexus 계정 접속후 다운로드 받은 압축파일 해제 
#nexus 계정 접속
su - nexus
#바이너리 다운로드
wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz --no-check-certificate
#압축해제
tar xvzf nexus-latest-bundle.tar.gz

Nexus 서비스 등록 설정

cd nexus-2.15.1-02/bin
vi /etc/init.d/nexus
NEXUS_HOME="/home/nexus/nexus-2.15.1-02"
RUN_AS_USER=nexus
PIDDIR="/home/nexus"
cp nexus /etc/init.d/nexus

Nexus 서비스 시작

  • service nexus start 
[nexus@centos7:/home/nexus/nexus-2.15.1-02/bin]$ service nexus start
Starting Nexus OSS...
Started Nexus OSS.
  • 서비스 정상 부팅 확인
  • ps -ef | grep nexus | grep -v grep
  • netstat -tnlp | grep java

Nexus 웹 접속 

  • http://[서버 IP]:8081/nexus
  • 최초 비밀번호는 admin/admin123 입니다. 

Nexus admin 접속
nexus 어드민 접속

 

Nexus User 생성

  • Security -> Users -> add 버튼 클릭후 유저 정보 입력 
  • 유저 정보 하단 Role Management ->add 버튼 클릭 후 롤 선택후 유저 생성 

nexus 유저생성 이미지

Nexus 라이브러리 업로드

  • 오라클 jdbc 바이너리를 업로드 하는 방법에 대해 알아보겠습니다. 
  • views/ Repositories 메뉴-> Repositories -> 3rd party -> Artifact upload 버튼 클릭 
  • 업로드 할 라이브러리 선택(ojdbc8.jar) 후 Add Artifact 클릭 
  • upload Artifact(s) 선택 하면 ojdbc8.jar 가 업로드 됩니다. 

nexus 오라클 jdbc 라이브러리 업로드

 

Nexus 라이브러리 Maven xml 정보 확인 

업로드가 완료되면 Browse Index 창에서 업로드된 라이브러리를 확인 할 수 있으며 

pom.xml 에 작성할 xml 정보를 확인할수 있습니다. 

pom.xml maven 정보

이클립스 Nexus 설정 

이클립스에서 nexus 레파지토리 정보를 입력해 줍니다. 

설정 파일은 setting.xml 파일이며 이클립스 Preferences 창을 열어 

User Settings 을 선택후 아래 내용을 작성합니다. 

setting.xml 수정  

<setting.xml >
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
    <server>
        <id>thirdparty</id>
        <username>admin</username>
        <password>admin123</password>
    </server>
</servers>
</settings>

 

2.pom.xml 수정 

<distributionManagement>
<repository>
<id>thirdparty</id>
<url>http://xxx.xxx.xxx.xxx:8081/nexus/content/repositories/thirdparty</url>
</repository>
</distributionManagement>

레파지 토리 정보는 nexus 레파지토리에서 Summary 항목에서 확인 하실수 있습니다. 

 

 

이상 이클립에서 nexus 레파지토리에 등록된 라이브러리 사용 방법에 대해 알아 보았습니다. 

728x90
반응형

'04.DevTools' 카테고리의 다른 글

[SVN] SVN 사용법  (0) 2024.11.14
[IntelliJ] Intellij Gitlab 연동  (0) 2024.08.16
728x90
반응형

 

 

Gitlab 사용시 자주 사용하는 다양한 명령어 사용법에 대해 작성한 글입니다. 

 

Gitlab 버전 정보 확인

gitlab-rake gitlab:env:info

gitlab 서비스 상태 확인 

gitlab-ctl status
root@ubuntu2004:/var/log# gitlab-ctl status
run: alertmanager: (pid 1473216) 7764s; run: log: (pid 1440782) 14293s
run: gitaly: (pid 1442283) 14000s; run: log: (pid 1438105) 14970s
run: gitlab-exporter: (pid 1473228) 7764s; run: log: (pid 1440657) 14312s
run: gitlab-kas: (pid 1473230) 7764s; run: log: (pid 1438363) 14948s
run: gitlab-workhorse: (pid 1473241) 7763s; run: log: (pid 1438889) 14659s
run: grafana: (pid 1473251) 7763s; run: log: (pid 1441383) 14201s
run: logrotate: (pid 1493932) 562s; run: log: (pid 1438049) 14982s
run: nginx: (pid 1473268) 7762s; run: log: (pid 1438932) 14648s
run: node-exporter: (pid 1473276) 7762s; run: log: (pid 1440636) 14315s
run: postgres-exporter: (pid 1473282) 7761s; run: log: (pid 1440816) 14287s
run: postgresql: (pid 1442385) 13995s; run: log: (pid 1438227) 14959s
run: prometheus: (pid 1473290) 7761s; run: log: (pid 1440757) 14298s
run: puma: (pid 1473300) 7760s; run: log: (pid 1438854) 14671s
run: redis: (pid 1442415) 13994s; run: log: (pid 1438068) 14976s
run: redis-exporter: (pid 1473306) 7760s; run: log: (pid 1440682) 14303s
run: sidekiq: (pid 1473315) 7759s; run: log: (pid 1438872) 14665s

Gitlab Log 확인

gitlab 사용시 로그 확인 방법에 대해 알아봅니다. 

gitlab 웹 로그 확인 

/var/log/gitlab/gitlab-rails/production.log  에 로그가 남습니다. tail 로 실시간 로그를 확인 할수 있습니다. 

tail -f  /var/log/gitlab/gitlab-rails/production.log

 

root@ubuntu2004:~# tail -f  /var/log/gitlab/gitlab-rails/production.log
Completed 200 OK in 34ms (Views: 0.5ms | ActiveRecord: 0.0ms | Elasticsearch: 0.0ms | Allocations: 814)
Started GET "/api/v4/geo/proxy" for 127.0.0.1 at 2022-04-16 12:36:37 +0900
Started GET "/-/metrics" for 127.0.0.1 at 2022-04-16 12:36:44 +0900
Processing by MetricsController#index as HTML
Completed 200 OK in 33ms (Views: 0.4ms | ActiveRecord: 0.0ms | Elasticsearch: 0.0ms | Allocations: 814)
Started GET "/api/v4/geo/proxy" for 127.0.0.1 at 2022-04-16 12:36:47 +0900
Started GET "/api/v4/geo/proxy" for 127.0.0.1 at 2022-04-16 12:36:57 +0900
Started GET "/-/metrics" for 127.0.0.1 at 2022-04-16 12:36:59 +0900
Processing by MetricsController#index as HTML
Completed 200 OK in 32ms (Views: 0.4ms | ActiveRecord: 0.0ms | Elasticsearch: 0.0ms | Allocations: 814)
Started GET "/api/v4/geo/proxy" for 127.0.0.1 at 2022-04-16 12:37:07 +0900
Started GET "/-/metrics" for 127.0.0.1 at 2022-04-16 12:37:14 +0900
Processing by MetricsController#index as HTML
Completed 200 OK in 36ms (Views: 0.5ms | ActiveRecord: 0.0ms | Elasticsearch: 0.0ms | Allocations: 814)

 

gitlab 서비스 로그 확인 

gitlab-ctl tail 명령을 통해  gitlab 서버에서 남기는 각종 로그를 확인할수 있습니다. 

  • gitlab-ctl tail [service 명]
  • 서비스명은 gitlab-ctl status 로 확인되는 서비스명입니다. 
gitlab-ctl tail
gitlab-ctl tail postgresql
gitlab-ctl tail ngix

gitlab-ctl tail

728x90
반응형

+ Recent posts