파이어맨 이야기

이번에 설치할 프로그램은 Git 저장소를 관리하는 프로그램인 GitLab입니다. 




1. 환경정보

OS : CentOS 6.7 Final

프로그램 버전 : gitlab-ce-8.0.4-ce.1.el6.x86_64.rpm


2. 설치하기 

  1. 필수 모듈을 설치합니다. 
    • yum install curl openssh-server postfix cronie
  2. 메일과 관련된 postfix 서비스를 시작합니다. 
    • service postfix start
  3. lokkit 을 통해 Iptables 설정을 합니다.
    • lokkit -s http -s ssh
  4. 명령어
    • curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash
  5. yum으로 gitlab을 설치합니다. 
    • yum install gitlab-ce
  6. gitlab.rb파일에서 external_url을 수정하여 서버 IP정보를 적용합니다. 
    1. vi /etc/gitlab/gitlab.rb
    2. external_url 'http://<ip>'
    3. gitlab_rails['gitlab_email_from'] = "gitlab@domain.com"
    4. gitlab_rails['gitlab_support_email'] = "your_email@domain.com"
    5. 저장합니다.
  7. GitLab설정을 변경합니다. 
    • gitlab-ctl reconfigure



3. 접속하여 프로젝트 설정하기 

  1. 서버IP로 접속합니다.


  2. ID:root , PW:5iveL!fe 을 입력하여 로그인합니다. 
  3. 비밀번호 변경창이 뜨면 비밀번호를 변경합니다.
  4. 다시 ID:root PW:<변경한 비밀번호> 로 접속합니다. 




4. ssh-keygen생성하기 
  1. 먼저 윈도우에서 git 프로그램을 실행합니다. 
  2. ssh-keygen 명령어를 실행합니다. 
  3. 암호를 입력하여 생성합니다. 



5. 프로젝트에 ssh-key등록하기 

  1. 프로젝트에 로그인을 합니다. 
  2. 프로젝트 생성을 클릭합니다.
  3. 프로젝트 정보를 입력후에 생성합니다.
  4. Profile Setting을 클릭합니다. 
  5. SSH Keys를 클릭합니다.
  6. Add SSH Key를 클릭합니다. 
  7. Key와 title을 입력합니다. 
    • 타이틀을 입력하고 key는 cat ~/.ssh/id_rsa 명령어로 출력후 붙여 넣기 합니다.
  8. add key를 클릭하여 저장합니다. 


6. git 저장소 내용을 clone받기
  1. git 사용자 설정을 합니다.
    1. git config --global user.name "Administrator"
      git config --global user.email "admin@example.com"
  2. 프로젝트의 URL을 확인하여 clone을 통해 저장소를 하고 변경내용을 서버에 push합니다.
    1. git clone git@192.168.0.155:root/git_test4.git
      cd git_test4
      touch README.md
      git add README.md
      git commit -m "add README"
      git push -u origin master



참고 

https://about.gitlab.com/downloads/#centos6



'IT > 프로그램' 카테고리의 다른 글

no kex alg 에러 ( OpenSSH 접속 실패 )  (0) 2016.05.05
Git Tag 관리하기  (0) 2015.10.23
무료 솔루션 wizmall 설치하기  (0) 2015.10.07
Linux 한글 폴더 이름의 인코딩 변경 ( convmv )  (0) 2015.09.16
Postgresql 명령어  (0) 2015.08.03

공유하기

facebook twitter kakaoTalk kakaostory naver band