Skip to content

Instantly share code, notes, and snippets.

@ktx2207
Last active August 29, 2015 14:09
Show Gist options
  • Save ktx2207/a7e4d7b6e5f0a595527c to your computer and use it in GitHub Desktop.
Save ktx2207/a7e4d7b6e5f0a595527c to your computer and use it in GitHub Desktop.
GitLabインストール手順

GitLabインストール

rpmインストール

下記の手順に従う
https://about.gitlab.com/downloads/

CentOS 7の場合

curl -O https://downloads-packages.s3.amazonaws.com/centos-7.0.1406/gitlab-7.4.3_omnibus.5.1.0.ci-1.el7.x86_64.rpm
sudo yum install openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo rpm -i gitlab-7.4.3_omnibus.5.1.0.ci-1.el7.x86_64.rpm

/etc/gitlab/gitlab.rb を編集

編集前
# Check and change the external_url to the address your users will type in their browser
external_url 'ip-XXX-XXX-XXX-XXX.ap-southeast-1.compute.internal'
編集後
# Check and change the external_url to the address your users will type in their browser
external_url 'https://example.com'
nginx['redirect_http_to_https'] = true
nginx['listen_addresses'] = ["0.0.0.0", "[::]"] # listen on all IPv4 and IPv6 addresses
HTTPSを有効にする

証明書を配置

sudo mkdir -p /etc/gitlab/ssl
sudo chmod 700 /etc/gitlab/ssl
sudo cp example.com.key example.com.crt /etc/gitlab/ssl/

Configure

sudo gitlab-ctl reconfigure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment