sudo apt install ca-certificates curl openssh-server postfix
mkdir tmp
cd tmp/
curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
bash script.deb.sh
sudo apt install gitlab-ce #比较慢,耐心等待,后面会突然变快
然后,打开vim /etc/gitlab/gitlab.rb
文件,将external_url = 'http://git.example.com'
修改成自己的 IP 或者 HostName,比如:
external_url = 'http://172.17.172.89'
sudo apt-get install postfix
sudo gitlab-ctl reconfigure
gitlab-rails console -e production