GitLab を稼動させてみます。
AWS EC2 の t2.small の Ubuntu でいってみます。なお、t2.micro だと GitLab のインストール中にメモリ不足連発となり使いものになりませんでした。
Ubuntu Server 16.04 LTS (HVM), SSD Volume Type – ami-afb09dc8
Ubuntu Server 16.04 LTS (HVM),EBS General Purpose (SSD) Volume Type. Support available from Canonical (http://www.ubuntu.com/cloud/services).
https://about.gitlab.com/downloads/#ubuntu1604 を参考に。途中 Postfix の設定を求められますが適当に入れておきます。なお、GitLab はユーザー登録時にメールでお知らせするのですが、メールを送信できない場合の対処は後述。
sudo apt-get update sudo apt-get install curl openssh-server ca-certificates postfix # Internet Site - system name: localhost curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash sudo apt-get install gitlab-ce sudo gitlab-ctl reconfigure
で、reconfigure 時に下記のエラーとなります。
sudo gitlab-ctl reconfigure Starting Chef Client, version 12.12.15 resolving cookbooks for run list: ["gitlab"] Synchronizing Cookbooks: - runit (0.14.2) - package (0.0.0) - gitlab (0.0.1) Installing Cookbook Gems: Compiling Cookbooks... ================================================================================ Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb ================================================================================ RuntimeError ------------ GitLab external URL must include a schema and FQDN, e.g. http://gitlab.example.com/
/etc/gitlab/gitlab.rb を例えば下記のように編集して再度 reconfigure します。
# external_url 'GENERATED_EXTERNAL_URL' // before external_url = 'localhost' // after
sudo gitlab-ctl reconfigure
これでたぶん GitLab が起動します。TCP:80 にアクセスし、ユーザー名 root のパスワードを設定します。
一般ユーザー登録時にメールで知らせるのではなく、GitLab 管理者が GitLab の UI 上でパスワードを設定したい場合、http://dotnsf.blog.jp/tag/gitlab を参考にします。
/etc/gitlab/gitlab.rb を下記のように変更。
external_url 'http://(IPアドレス)'
/opt/gitlab/embedded/service/gitlab-rails/app/models/user.rb に下記を追加。
default_value_for :confirmed_at, Time.now
そして再度 reconfigure します。
sudo gitlab-ctl reconfigure