第一步安装依赖的软件包
apt-get install curl openssh-server ca-certificates postfix
systemctl start sshd
systemctl start postfix
默认就行


第二步在清华大学源中下载gitla-ce
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/debian/pool/stretch/main/g/gitlab-ce/
下载gitlab-ce_11.5.0-ce.0_amd64.deb包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/debian/pool/stretch/main/g/gitlab-ce/gitlab-ce_11.5.0-ce.0_amd64.deb
安装gitlab
dpkg -i gitlab-ce_11.5.0-ce.0_amd64.deb

配置并启动GitLab
gitlab-ctl reconfigure
如果出错
Running handlers:
There was an error running gitlab-ctl reconfigure:
execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8] (postgresql::enable line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
STDOUT: The files belonging to this database system will be owned by user "gitlab-psql".
This user must also own the server process.
解决方法:
设置中文zh_CN.UTF-8
dpkg-reconfigure locales


重启一下系统
reboot
配置并启动GitLab
gitlab-ctl reconfigure
网友评论