본문 바로가기
programming | development/linux

[ubuntu] gitlabe ce 설치, gitlab-runsvdir 실행 오류

by foooo828 2024. 9. 6.

깃랩 설치

사전 세팅

sudo apt update && sudo apt upgrade -y

필수 패키지 추가

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

curl : client url. url 로 데이터 다운및 전송 가능

open-ssh : ssh

ca-certificates :  https 사용할때 필요한 ssl 인증서 처리

tzdata : 서버시간대 설정하는 패키지

 

**선택사항 postfix : 메일 인증

sudo apt install -y postfix

 

깃랩 repository 추가

gitlab-ce 설치할거

패키지 관리자(apt : advanced package tool)로 깃랩 설치할 수 있도록 깃랩의 공식 패키지 저장소를 추가

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

gitlab-ce 설치

sudo apt install gitlab-ce

 

설정파일 수정하기

nano로 설정파일을 수정할거다.

sudo nano /etc/gitlab/gitlab.rb

여기서 접속할 url를 수정한다

초기 root 계정 비밀번호 확인하여 계정 접속

sudo cat /etc/gitlab/initial_root_password  | grep Password:

 

Trouble shooting

부팅시 자동실행 문제

시스템 재부팅을 했는데 깃랩 실행이 안되어있길래 gitlab-ctl start로 수동실행하려니까 아래와 같이 오류

fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-exporter: runsv not running
fail: gitlab-kas: runsv not running
fail: gitlab-workhorse: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: node-exporter: runsv not running
fail: postgres-exporter: runsv not running
fail: postgresql: runsv not running
fail: prometheus: runsv not running
fail: puma: runsv not running
fail: redis: runsv not running
fail: redis-exporter: runsv not running
fail: sidekiq: runsv not running

systemctl enable gitlab-runsvdir.service
systemctl start gitlab-runsvdir.service

다 안됨

 

아래 명령어 입력 후 다시 수동 실행 gitlab-ctl start  하면 정상적으로 작동

sudo /opt/gitlab/embedded/bin/runsvdir-start &

 

(설치나 gitlav-ctl reconfigure  중 ruby_block[supervise_redis_sleep] action run 에서 중단되었을때도

다른 터미널을 열어 위 명령어 입력하면 정상적으로 진행된다)

 

ㅡ 했으나 다시 재부팅 해보니까 또 안됨

 

포럼에서 디스플레이 없으면 gitlab-rundsvdir 자동실행 안된다는 글을 발견. 설마하고 모니터 연결해서 재부팅 하니까 진짜 잘됨

https://forum.gitlab.com/t/gitlab-runsvdir-service-failed-to-start-with-ubuntu-18-04-gui-edition/32281

 

런레벨 기본값을 확인해보니 graphical.target 으로 돼있었음  

sudo systemctl get-default

멀티유저 타겟으로 변경해야한다.

sudo systemctl set-default multi-user.target

 

변경후 리부트 하면 정상적으로 자동실행됨

 

https://gitlab-docs.infograb.net/omnibus/troubleshooting.html

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

댓글