パッケージで入れると、とてつもなく依存が多い。のとLOCALE=Cでやった方がよさそう。
# apt install gitlab Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: asciidoctor bc binutils build-essential bundler bzip2 ca-certificates ... 0 upgraded, 563 newly installed, 0 to remove and 0 not upgraded. Need to get 174 MB of archives. After this operation, 671 MB of additional disk space will be used. Do you want to continue? [Y/n]
それと、実運用する場合、DNSのAを向けておかないとちゃんと動かないかもしれない。
更新通知のメールアドレスが必須なので入れる。
あと、これやるとなんかしらんがその先で落ちる事があるらしい。その場合は
# /etc/init.d/nginx start
とかしてサーバ起動しておいてapt -f installすると通過する事もあるようだ。この辺は割と適当。
これはdbconfig-commonを使った方が無難である。使わん場合はよくわからん。
で、大抵localhostだろうからそれを選択し、
これ。入力しても無反応な事が多い (環境によるかもだが)が、入ってるので、とりあえず間違えずに入力する。次のconfirmも間違えないように。
Processing triggers for systemd (232-25+deb9u1) ... Errors were encountered while processing: gitlab E: Sub-process /usr/bin/dpkg returned an error code (1)
Running rake checks... Check if Gitlab is configured correctly... Checking GitLab Shell ... GitLab Shell version >= 3.6.6 ? ... OK (3.6.7) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by gitlab:gitlab? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... can't check, you have no projects Running /usr/share/gitlab-shell/bin/check Check GitLab API access: OK Access to /usr/share/gitlab/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful Checking GitLab Shell ... Finished Checking Sidekiq ... Running? ... yes Number of Sidekiq processes ... 1 Checking Sidekiq ... Finished Checking Reply by email ... Reply by email is disabled in config/gitlab.yml Checking Reply by email ... Finished Checking LDAP ... LDAP is disabled in config/gitlab.yml Checking LDAP ... Finished Checking GitLab ... Git configured with autocrlf=input? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory setup correctly? ... skipped (no tmp uploads folder yet) Init script exists? ... yes Init script up-to-date? ... yes projects have namespace: ... can't check, you have no projects Redis version >= 2.8.0? ... yes Ruby version >= 2.1.0 ? ... yes (2.3.3) Your git bin path is "/usr/bin/git" Git version >= 2.7.3 ? ... yes (2.11.0) Active users: 1 Checking GitLab ... Finished Setting up dh-python (2.20170125) ... Setting up python3 (3.5.3-1) ... running python rtupdate hooks for python3.5... running python post-rtupdate hooks for python3.5... Setting up lsb-release (9.20161125) ... Processing triggers for libc-bin (2.24-11+deb9u1) ... Processing triggers for systemd (232-25+deb9u1) ...
こんな具合で終わる
installが終わるとhttpで入れる(httpsを設定した場合はそっち)ので、ここにアクセスする、と、change your passwordとなるので、適当に設定し、root / そのパスワードでアクセスする。
/var/lib/gitlab/repositories/以下に置かれる
ドキュメントにある https://docs.gitlab.com/omnibus/settings/backups.html
sudo sh -c 'umask 0077; tar -cf $(date "+etc-gitlab-%s.tar") -C / etc/gitlab'
これは、単純な/etcのコピー