#파일 추가
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
파일이 없는 빈 디렉토리는 자동으로 무시 되기 때문에 간접적인 방법으로 .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 파일은 특별한 의미를 가지지 않는 관례적인 이름으로 사용 하며 빈 디렉토리임을 다른 사용자가 의도적으로 비어있는것을 표현해 주는 의미다.
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.
#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 활성 파일 빌드"
},
]
}
라이브러리 사설 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 버튼 클릭 후 롤 선택후 유저 생성
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 서버에서 남기는 각종 로그를 확인할수 있습니다.