1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWSのUbuntuにGitlabをインストールする

Last updated at Posted at 2018-05-17

今回は「Ubuntu Server 16.04 LTS (HVM), SSD Volume Type」を選択し、メモリを4Gとしました。
1Gだとメモリがーと怒られたのですが、2Gでも大丈夫かもしれません。

下準備

更新して、curl、openssh-server、ca-certificates、postfixをインストール。

$ sudo apt-get update
$ sudo apt-get install -y curl openssh-server ca-certificates
$ sudo apt-get install -y postfix

postfixの設定はデフォルトのままにしました。
ドメインだけ、gitlab.mydomain.comとしておくと後で楽かもしれません。

gitlabのインストール

後で行う日本語化が9.1.4までしかリリースされていないので、9.1.4をインストール。

$ curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
$ sudo EXTERNAL_URL="http://gitlab.mydomain.com" apt-get install gitlab-ce=9.1.4-ce.0

日本語化

日本語化ファイルを取得し、解凍します。

cd /tmp
wget https://github.com/ksoichiro/gitlab-i18n-patch/archive/master.zip
sudo apt-get install unzip
unzip master.zip

回答したパッチをgitlab本体にあてます。

cd /opt/gitlab/embedded/service/gitlab-rails
sudo patch -p1 < /tmp/gitlab-i18n-patch-master/patches/v9.1.4/app_ja.patch

以上です。

動作確認後、もしドメイン表記がAWSのパブリックDNSのままであった場合は下記修正をします。

sudo vi /etc/gitlab/gitlab.rb

下記の通り変更。

external_url 'http://gitlab.mydomain.com'

書き換えが終わったら、反映して再起動します。

sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?