1 镜像下载地址
我目前使用的版本是:11.10.2
版本13以后,把原始仓库路径默认都给变成了hash加密了,很难辨识出原始仓库,所以不选择13以上的版本。
2 每次服务器断电后不能启动gitlab
2.1 断电后启动gitlab报错
fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-monitor: runsv not running
fail: gitlab-workhorse: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: node-exporter: runsv not running
fail: postgres-exporter: runsv not running
fail: postgresql: runsv not running
fail: prometheus: runsv not running
fail: redis: runsv not running
fail: redis-exporter: runsv not running
fail: sidekiq: runsv not running
fail: unicorn: runsv not running
2.2 解决办法
2.2.1 参考gitlab官方文档 gitlab-runsvdir not starting
https://docs.gitlab.com/omnibus/common_installation_problems/#gitlab-runsvdir-not-starting
2.2.2 执行systemctl -t target 有dead字段
yfgitlab@ubuntu:~$systemctl -t target
................
multi-user.target loaded inactive dead start Multi-User System //执行命令以后有dead
............
2.2.3 执行systemctl list-jobs
yfgitlab@ubuntu:~$ systemctl list-jobs
JOB UNIT TYPE STATE
2 multi-user.target start waiting
1 graphical.target start waiting
139 gitlab-runsvdir.service start waiting
162 ureadahead-stop.timer start waiting
140 plymouth-quit-wait.service start running //这里有一个running,官方建议卸载,然后gitlab就能启动了
26 setvtrgb.service start waiting
129 system-getty.slice start waiting
156 systemd-update-utmp-runlevel.service start waiting
In this case, consider uninstalling Plymouth (官方文档解决办法)
执行sudo apt remove plymouth 删掉这个应用
3 FreeNAS使用
我的gitlab安装在了ubuntu上面,ubuntu通过nfs挂载了FreeNAS的存储盘,这样将giltlab的原始仓库保存在FreeNAS服务器上面,防止丢失。
参考官方文档挂载nfs
nfs挂载参数
192.168.10.194:/mnt/storage/gitlab_nfs /mnt/gitlab_nfs nfs4 defaults,vers=4.1,hard,rsize=1048576,wsize=1048576,noatime,nofail,lookupcache=positive 0 2
nfs按上面的参数进行挂载,否则gitlab会出现读写权限的问题