3Step으로 Let’s Encrypt의 보호된 GitLab 구축
                                            
                                                
                                                
                                                
                                                
                                                
                                                 6884 단어  letsencryptOSSGitLab
                    
GitLab 의 웹사이트는 SSL(암호화 통신)으로 보호는 합니다만 GitLab 로부터의 메일 송신은 구축하지 않습니다.
3Step은 3분이라고 쓰고 싶었지만 스펙보다 구축에 9분 정도 걸립니다.
 
  
 
Operating Systems
사쿠라 클라우드에서 작동 확인
Installation
Let’s Encrypt 는 Certbot 에서 가져옵니다.
GitLab 은 Omnibus package 으로 구축합니다.
Step 1
apt-get 명령으로 패키지를 설치합니다. $ sudo apt-get install -y software-properties-common
$ sudo add-apt-repository -y ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install -y curl openssh-server ca-certificates certbot
$ curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
$ sudo EXTERNAL_URL="http://gitlab.example.com" apt-get install -y gitlab-ce
Step 2
$ sudo vi /etc/gitlab/gitlab.rb
/etc/gitlab/gitlab.rb
nginx['custom_gitlab_server_config'] = "location ^~ /.well-known { root /var/www/letsencrypt; }"
gitlab-ctl 명령으로 GitLab을 다시 시작합니다. certbot 명령으로 Let’s Encrypt 인증서를 얻을 수 있습니다. $ sudo mkdir -p /var/www/letsencrypt
$ sudo gitlab-ctl reconfigure
$ sudo certbot certonly --webroot --webroot-path=/var/www/letsencrypt -d gitlab.example.com
/etc/letsencrypt/live/에 파일이 저장됩니다. IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/gitlab.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/gitlab.example.com/privkey.pem
Step 3
$ sudo vi /etc/gitlab/gitlab.rb
/etc/gitlab/gitlab.rb
external_url 'https://gitlab.example.com'
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/letsencrypt/live/gitlab.example.com/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/gitlab.example.com/privkey.pem"
gitlab-ctl 명령으로 GitLab을 다시 시작합니다. $ sudo gitlab-ctl reconfigure
https://gitlab.example.com로 이동하여 root 사용자의 암호를 입력합니다. 
이제 GitLab의 서버 관리자가 되었습니다.
Admin Area > Settings 에서 Sign-up enabled 의 체크를 해제하면 Register 가 표시되지 않게 되어 사용자의 등록을 억제할 수 있습니다. 등 관리자의 힘을 사용합시다!Let’s Administer life
Tips
메일 송신을 구축하고 있지 않기 때문에 패스워드를 리셋트 하고 싶은 경우는
rails console 커멘드로 편집합니다. ( 루비 이나 Rails 의 지식이 있으면 여러가지 되어 편리할지도)$ sudo gitlab-rails console -e production
Loading production environment (Rails 4.2.8)
irb(main):001:0> User.find_by(username: :root).update!(password: :pass1234, password_confirmation: :pass1234, password_expires_at: Time.now)
password_expires_at로 날짜를 설정하면 임시 비밀번호가 처리되고 로그인하면 Setup new password로 재설정 할 수 있습니다.
 2018년 3월 10일 OSS Gate 오사카 워크숍 에서는 GitLab 이벤트를 개최합니다. OSS 개발에 참여하고 기여합시다!
 2018년 3월 10일 OSS Gate 오사카 워크숍 에서는 GitLab 이벤트를 개최합니다. OSS 개발에 참여하고 기여합시다!
                Reference
이 문제에 관하여(3Step으로 Let’s Encrypt의 보호된 GitLab 구축), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ogomr/items/238d8649b36bcc8c14ba텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)