Gitサーバを構築する(Ubuntu18.04)

Docker上のUbuntuにGitサーバを立てて使ってみる。
ここ(GitLab Official Linux Package)に沿ってインストールしていく。

1. Install and configure the necessary dependencies
サーバ側にgitをインストール
$ sudo apt install git
$ git --version
git version 2.17.1
$ sudo apt install curl openssh-server ca-certificates
$ sudo apt install postfix
 Satellite system:
  All mail is sent to another machine, called a 'smarthost', for delivery.
 Local only:
  The only delivered mail is the mail for local users. There is no network.

  1. No configuration  2. Internet Site  3. Internet with smarthost  4. Satellite system  5. Local only
  General type of mail configuration: 5
..............
..............
  System mail name: test@gitserver.jp

2. Add the GitLab package repository and install the package
GitLabのrepositoryを追加しInstall
# Repositoryの追加とgitlabのインストール
$ curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
$ sudo apt install gitlab-ce

# gitlabの設定
$ sudo vim /etc/gitlab/gitlab.rb
# Git リポジトリへアクセスするときに使う URLの設定
 29 ##! external_url 'http://gitlab.example.com'
  30 external_url 'http://127.0.0.1:20080'
# Timezoneの設定
  66 # gitlab_rails['time_zone'] = 'UTC'
  67 gitlab_rails['time_zone'] = 'Asia/Tokyo'

# 設定の反映
$ sudo gitlab-ctl reconfigure

3. Browse to the hostname and login
GitLabのrepositoryを追加
$ sudo apt install gitlab-ce

参考:

コメント

このブログの人気の投稿

ソリューション構成ごとにconfigファイルを作成する

C++の古いプロジェクトのビルドでerror MIDL2311 : statements outside library block are illegal in mktyplib compatability mode

web.config debug/releaseの内容を変換構文を使って切り替える