반응형

안녕하세요.

회사에서 gitlab 서버를 구성해야 할 일이 있어 관련 내용을 찾아 정리해보았습니다.


1. gitlab 설치

공식 홈페이지의 설치 페이지를 참고 하였습니다.

https://about.gitlab.com/install/

 

Download and install GitLab

Learn about the various GitLab installation packages and downloads for Ubuntu, Debian, Docker, Google Cloud, and many more.

about.gitlab.com



먼저 다음 명령어들로 필수 패키지들을 설치해 줍니다.

# sudo apt-get update

# sudo apt-get install -y curl openssh-server ca-certificates tzdata perl

# sudo apt-get install -y postfix


그리고 아래 명령어로 gitlab을 설치해 줍니다.

# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash

# sudo EXTERNAL_URL="https://gitlab.example.com" apt-get install gitlab-ee


2. gitlab 기본 설정 - /etc/gitlab/gitlab.rb 파일 수정

gitlab의 설정 파일을 수정해 줍니다.

경로는 /etc/gitlab/gitlab.rb 입니다.


외부 접속 URL 설정은 아래 내용을 수정해 줍니다.


external_url 'URL'



URL은 기본적으로 https://IP주소


의 형태로 되어 있습니다.


gitlab의 데이터가 저장되는 경로는 아래 내용을 수정해 줍니다.

git_data_dirs({
	"default" => {
		"path" => "DIR_PATH/git-data"
	}
})



gitlab 데이터가 저장되는 디렉토리를 git-data 로 해주어야 정상 동작 하더라구요.

어느 경로가 됐든 마지막 디렉토리 이름은 git-data 로 설정 하시는게 좋습니다.


3. 설정 적용 및 재시작

아래 명령어로 설정을 저장해주고, 재시작 해줍니다.

# sudo gitlab-ctl reconfigure

# sudo gitlab-ctl restart


4. gitlab 접속

웹 브라우져에 URL을 입력해 줍니다.

관리자 ID는 root 이고,

초기 비밀번호는

/etc/gitlab/initial_root_password

파일을 확인해 주시면 됩니다.

반응형
Posted by 해리팍

BLOG main image

Chanhyun Park (해리팍)
Software Engineer @ SK hynix

Contact Info.
parkch0708@hanmail.net
chanhyun0708@gmail.com
chanhyun.park@sk.com

카테고리

All (1501)
Profile (2)
Park's Life (599)
Computer System (165)
Computer Programming (39)
Computer Study (54)
Computer Etc. (189)
Scuba Diving (137)
Golf (8)
Traveling (245)
생활 정보 (12)
Pokemon GO (50)