予め、gitlabの依存パッケージをインストールして下さいね。gitlab公式<URL:https://www.gitlab.jp/install/>
を参照して下さい。
$ sudo apt-get update $ sudo apt-get install -y curl openssh-server ca-certificates
まず、パッケージマネージャ aptのパッケージリストにgitlab-ceのURLを追加してから、gitlab-ceをインストールします。
もし、gitlab-eeをインストールしたければ、以下のgitlab-ce部分をgitlab-eeに置き換えて実施して下さいね。
手順:
1.gitlab-ceのスクリプトをダウンロードする
$ wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
2.ダウンロードしたscript.deb.shをエディットする
apt_config_url=を探して$(os)部分と$(dist)部分を変更する。
LinuxMint20はUbuntu 20.04 LTSがベースなので、"$(os)"→"ubuntu"、"$(dist)"→"focal"に置き換えます。
apt_config_url="https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.list?os=ubuntu&dist=focal&source=script"
ちなみに。。。
- Mint19.Xの場合、ベースバージョンはUbuntu 18.04 LTSなので、"$(dist)"→"bionic"です。
- Mint18.Xの場合、Ubuntu 16.04 LTSなので、"$(dist)"→"xenial"です。
3.script.deb.shを実行する
$ sudo bash script.deb.sh Detected operating system as LinuxMint/ulyana. Checking for curl... Detected curl... Checking for gpg... Detected gpg... Running apt-get update... done. Installing apt-transport-https... done. Installing /etc/apt/sources.list.d/gitlab_gitlab-ce.list...done. Importing packagecloud gpg key... done. Running apt-get update... done. The repository is setup! You can now install packages.
4.aptアップデートする
$ sudo apt update ヒット:1 http://archive.canonical.com/ubuntu focal InRelease ヒット:2 http://archive.ubuntu.com/ubuntu focal InRelease ヒット:3 http://security.ubuntu.com/ubuntu focal-security InRelease 無視:5 http://packages.linuxmint.com ulyana InRelease ヒット:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease ヒット:7 http://packages.linuxmint.com ulyana Release ヒット:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease ヒット:4 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu focal InRelease パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 パッケージはすべて最新です。
5.gitlab-ceをインストールする
$ sudo apt-get install gitlab-ce
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下のパッケージが新たにインストールされます:
gitlab-ce
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
837 MB のアーカイブを取得する必要があります。
この操作後に追加で 2,262 MB のディスク容量が消費されます。
取得:1 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu focal/main amd64 gitlab-ce amd64 13.6.3-ce.0 [837 MB]
837 MB を 26秒 で取得しました (32.0 MB/s)
以前に未選択のパッケージ gitlab-ce を選択しています。
(データベースを読み込んでいます ... 現在 378295 個のファイルとディレクトリがインストールされています。)
.../gitlab-ce_13.6.3-ce.0_amd64.deb を展開する準備をしています ...
gitlab-ce (13.6.3-ce.0) を展開しています...
gitlab-ce (13.6.3-ce.0) を設定しています ...
It looks like GitLab has not been configured yet; skipping the upgrade script.
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting external_url
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
sudo gitlab-ctl reconfigure
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
インストール完了です。