본문 바로가기

카테고리 없음

Gitlab & Gitlab - runner install on Ubuntu 18.04

gitlab 설치 & 초기 설정

>>Ubuntu 18.04 환경<<

 

1) 기초 소프트웨어 설치

sudo apt-get install curl openssh-server ca-certificates postfix
  • postfix 선택 옵션은 우선 No configuration 선택

 

2) gitlab 패키지 프로그램 저장소 추가

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

 

3) 저장소 목록 업데이트 & Gitlab Community Edition 설치

apt-get update
sudo apt-get install gitlab-ce

 

4) gitlab 초기 설정

sudo gitlab-ctl reconfigure
  • sudo 권한으로 설정해야 함

Gitlab 내부 설정

cd /
cd etc/gitlab/
sudo vim gitlab.rb
## gitlab.rb 내부 수정, 추가
external_url 'http://127.0.0.1:90' # 기본 localhost를 지칭하는 127.0.0.1에 포트번호는 임의로 지정

unicorn['enable'] = true
unicorn['worker_timeout'] = 60
unicorn['listen'] = 'localhost'

nginx['redirect_http_to_https'] = true
nginx['custom_gitlab_server_config'] = "location /.well-known/acme-challenge/ {\n root /var/opt/gitlab/nginx/www/;\n}\n"
letsencrypt['enable'] = false

## 참고 : https://blog.soobinpark.com/123

 

Gitlab 적용 & 재시작

sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart

재시작 시 나타나는 화면

 

port 확인

netstat -nap | grep :90

확인하면 이렇게 나온다.

 

 

** 이건 git 연결하다가 permision denied 되어서 갑자기 찾아본건데

server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

어쩌구 이런 에러가 뜨면

export GIT_SSL_NO_VERIFY=1

이걸 입력하니까 해결됨. ㅎㅎ 신난다