Ubuntu 18.04 安装 GitLab

开始安装

1
2
3
4
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
sudo EXTERNAL_URL="https://gitlab.li-chunli.top:20443" apt-get install -y gitlab-ee

SSL 证书存放位置:

1
2
3
4
5
root@gitlab:~# ll /etc/gitlab/ssl/
total 16
-rw-rw-r-- 1 chunli chunli 2887 Mar 8 07:59 gitlab.li-chunli.top.crt
-rw-rw-r-- 1 chunli chunli 227 Mar 8 07:59 gitlab.li-chunli.top.key
root@gitlab:~#

Gitlab 关闭注册

更改 SSH 端口

1
2
root@gitlab:~# vim /etc/gitlab/gitlab.rb 
gitlab_rails['gitlab_shell_ssh_port'] = 2022

gitlab 服务 重新配置

1
2
3
4
5
6
7
8
root@gitlab:~# gitlab-ctl reconfigure
...
Running handlers:
Running handlers complete
Chef Client finished, 2/761 resources updated in 08 seconds
gitlab Reconfigured!
root@gitlab:~#
root@gitlab:~# gitlab-ctl start