1. Install and configure the necessarydependencies
$sudo apt-get install curl openssh-serverca-certificates postfix
2. Add the GitLab package server andinstall the package
$curl -sShttps://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh| sudo bash
$sudo apt-get install gitlab-ce
$
3. 配置域名
$vim /etc/gitlab/gitlab.rb
## Url on which GitLab will be reachable.
## For more details on configuringexternal_url see:
## https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configu
ration.md#configuring-the-external-url-for-gitlab
#external_url 'http://ubuntu' #将ubuntu换成自己的IP地址
#external_url 'http://当前电脑的IP地址' #下面是我的IP地址
external_url 'http://192.168.220.131'
4.Configure and start GitLab
$sudo gitlab-ctl reconfigure