1. 1.  사전 작업

  • 필요 패키지 설치
    sudo dnf install -y curl policycoreutils openssh-server perl
    
    # Enable OpenSSH server daemon if not enabled: sudo systemctl status sshd
    sudo systemctl enable sshd
    sudo systemctl start sshd
    
    # Check if opening the firewall is needed with: sudo systemctl status firewalld
    sudo firewall-cmd --permanent --add-service=http
    sudo firewall-cmd --permanent --add-service=https
    sudo systemctl reload firewalld​
  • 알림 이메일 사용할 시 설치 (생략 가능)
    sudo dnf install postfix
    sudo systemctl enable postfix
    sudo systemctl start postfix​

 

2. 2.  설치

  • gitlab repository 추가
    curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash​
  • gitlab 설치
    sudo dnf install -y gitlab-ee​

 

3. 3.  설정 파일 수정

  • vi /etc/gitlab/gitlab.rb
  • '/찾을문자열' 기능으로 아래 내용 찾아 수정
    external_url='http://localhost:변경할포트'
    
    # '/8080' 찾으면 2개가 나옴.
    # 그 2개를 주석 해제하고, 맨 위에서 변경한포트와 다른 번호로 변경한다.​
  • 변경내용 적용
    sudo gitlab-ctl reconfigure​

 

4. 4.  Gitlab 접속

  • 브라우저에서 접속
    http://external_url에 설정한 주소​
  • root 비밀번호 변경하기
    gitlab-rails console -e production
    
    irb > user = User.where(id:1).first
    irb > user.password = 'New Password'
    irb > user.password_confirmation = 'New Password'
    irb > user.save
    irb > exit​
  • root / 변경한비밀번호로 로그인

'인프라 > Git' 카테고리의 다른 글

[Git] git clone SSL 인증서 문제  (0) 2021.11.09
복사했습니다!