LoginSignup
1
0

More than 1 year has passed since last update.

Gitlab Gitローカルサーバ構築 ubuntu 18.04

Last updated at Posted at 2021-09-17

Gitlab による ローカルGitサーバ を ubuntu 18.04 上に構築しましたので、下記にメモを残します。

参考サイト

インストール手順

sudo apt install curl openssh-server ca-certificates
sudo apt install postfix

※postfix の設定は Local only

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

※会社内など proxy 環境では上記 curl が失敗する可能性があります。
 error:1408F10B:SSL routines:ssl3_get_record:wrong version number
 その場合は script.deb.sh をダウンロードしてから bash で直接実行

sudo apt install gitlab-ce

The repository is setup! You can now install packages.
と表示されればリポジトリ登録完了

sudo apt install gitlab-ce

Thank you for installing GitLab!
と表示されればインストール完了

セッティング

sudo vim /etc/gitlab/gitlab.rb

下記2行を変更

external_url 'http://(ローカルアドレス)(:アクセスポート番号)'
※デフォルトだと 80 なので、例えば 9010 など、アクセスするポート番号をローカルで決めて設定

gitlab_rails['time_zone'] = 'Asia/Tokyo'

変更を反映させる

sudo gitlab-ctl reconfigure

初期ユーザ root のパスワードは下記にあり。確認しよう

sudo cat /etc/gitlab/initial_root_password

Password: (初期のランダムパスワードが設定されている)

ブラウザ等でアクセスして確認、ユーザ root、先ほどの Password を入力
あとは GUIベースで設定を変更
以上

1
0
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
0